aboutsummaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/util.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/util.rs b/src/util.rs
index eb5a595..9c78bdb 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -1,25 +1,3 @@
-/// Match a VariantMaps field and return it's contents if successfull
-///
-/// # Example
-///
-/// ```
-/// use libquassel::match_variant;
-/// use libquassel::primitive::{VariantMap, Variant};
-///
-/// let var = Variant::String("test string".to_string());
-/// let result = match_variant!(var, Variant::String);
-/// ```
-#[macro_export]
-macro_rules! match_variant {
- ( $values:expr, $x:path ) => {
- match &$values {
- $x(x) => Ok(x.clone()),
- err => Err(err),
- }
- .unwrap()
- };
-}
-
/// Prepend the length of `buf` to `buf`
pub fn prepend_byte_len(buf: &mut Vec<u8>) {
let len: i32 = buf.len().try_into().unwrap();