Skip to content

Commit

Permalink
Remove noisy rustc warnings (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
llgerard committed Nov 1, 2022
1 parent df508ca commit 37b4741
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gremlin-client/src/io/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ macro_rules! get_value {
match $value {
$v(e) => Ok(e),
_ => Err($crate::GremlinError::Json(String::from(stringify!($v)))),
};
}
};
}

Expand All @@ -79,7 +79,7 @@ macro_rules! expect_i32 {
match $value.as_i64() {
Some(v) => Ok(v),
None => Err($crate::GremlinError::Json(String::from("Expected i32"))),
}? as i32;
}? as i32
};
}

Expand All @@ -88,22 +88,22 @@ macro_rules! expect_i64 {
match $value.as_i64() {
Some(v) => Ok(v),
None => Err($crate::GremlinError::Json(String::from("Expected i64"))),
}?;
}?
};
}
macro_rules! expect_float {
($value:expr) => {
match $value.as_f64() {
Some(v) => Ok(v),
None => Err($crate::GremlinError::Json(String::from("Expected float"))),
}? as f32;
}? as f32
};
}
macro_rules! expect_double {
($value:expr) => {
match $value.as_f64() {
Some(v) => Ok(v),
None => Err($crate::GremlinError::Json(String::from("Expected double"))),
}?;
}?
};
}

0 comments on commit 37b4741

Please sign in to comment.