summary refs log tree commit diff stats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2022-04-24 17:31:06 -0300
committerSoniEx2 <endermoneymod@gmail.com>2022-04-24 17:31:06 -0300
commit4c39c45f6a97ffb3fd1193010aae9f7e9a11518e (patch)
tree20e4131a154fbc60e609fae976926f066cc693d9 /src/lib.rs
parent0e50a15c2b09c00692cdebf2f492d5a6dc1e7299 (diff)
Add more examples
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0ed40e2..c5c9b33 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1340,6 +1340,15 @@ impl<'a, 'ph: 'a> ValidContext<'a, 'ph> {
     }
 
     /// Compares two nicks based on the server's case mapping.
+    ///
+    /// ```no_run
+    /// use hexchat_unsafe_plugin::ValidContext;
+    ///
+    /// /// Checks if the two nicks below are equal.
+    /// fn compare_nicks(context: ValidContext<'_, '_>) -> bool {
+    ///     context.nickcmp("hello", "HELLO").is_eq()
+    /// }
+    /// ```
     pub fn nickcmp(&self, nick1: &str, nick2: &str) -> std::cmp::Ordering {
         use std::cmp::Ordering;
         let ph = &self.ph;