Skip to content

Commit f84d827

Browse files
nipunn1313Convex, Inc.
authored andcommitted
backend info include sentry types (#25478)
GitOrigin-RevId: a7b405f28c8965db21eadffb2661a29a32cc0722
1 parent 992ae8f commit f84d827

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

crates/value/src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,17 @@ impl TryFrom<String> for ConvexValue {
251251
}
252252
}
253253

254+
impl<T: TryInto<ConvexValue, Error = anyhow::Error>> TryFrom<Option<T>> for ConvexValue {
255+
type Error = anyhow::Error;
256+
257+
fn try_from(v: Option<T>) -> anyhow::Result<Self> {
258+
Ok(match v {
259+
None => ConvexValue::Null,
260+
Some(v) => v.try_into()?,
261+
})
262+
}
263+
}
264+
254265
impl<'a> TryFrom<&'a str> for ConvexValue {
255266
type Error = anyhow::Error;
256267

0 commit comments

Comments
 (0)