Skip to content

Commit

Permalink
backend info include sentry types (#25478)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: a7b405f28c8965db21eadffb2661a29a32cc0722
  • Loading branch information
nipunn1313 authored and Convex, Inc. committed May 10, 2024
1 parent 992ae8f commit f84d827
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/value/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,17 @@ impl TryFrom<String> for ConvexValue {
}
}

impl<T: TryInto<ConvexValue, Error = anyhow::Error>> TryFrom<Option<T>> for ConvexValue {
type Error = anyhow::Error;

fn try_from(v: Option<T>) -> anyhow::Result<Self> {
Ok(match v {
None => ConvexValue::Null,
Some(v) => v.try_into()?,
})
}
}

impl<'a> TryFrom<&'a str> for ConvexValue {
type Error = anyhow::Error;

Expand Down

0 comments on commit f84d827

Please sign in to comment.