Skip to content

Commit

Permalink
Removed parallel TryFrom<GValue> for f32 and f64
Browse files Browse the repository at this point in the history
  • Loading branch information
criminosis committed May 7, 2021
1 parent 3543278 commit dca681f
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions gremlin-client/src/structure/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,36 +334,6 @@ impl std::convert::TryFrom<GValue> for i64 {
}
}

impl std::convert::TryFrom<GValue> for f32 {
type Error = crate::GremlinError;

fn try_from(value: GValue) -> GremlinResult<Self> {
match value {
GValue::Float(s) => Ok(s),
GValue::List(s) => from_list(s),
_ => Err(GremlinError::Cast(format!(
"Cannot cast {:?} to f32",
value
))),
}
}
}

impl std::convert::TryFrom<GValue> for f64 {
type Error = crate::GremlinError;

fn try_from(value: GValue) -> GremlinResult<Self> {
match value {
GValue::Double(s) => Ok(s),
GValue::List(s) => from_list(s),
_ => Err(GremlinError::Cast(format!(
"Cannot cast {:?} to f64",
value
))),
}
}
}

impl std::convert::TryFrom<GValue> for uuid::Uuid {
type Error = crate::GremlinError;

Expand Down

0 comments on commit dca681f

Please sign in to comment.