-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch_tuple.rs
More file actions
31 lines (30 loc) · 816 Bytes
/
patch_tuple.rs
File metadata and controls
31 lines (30 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<<<<<<< SEARCH
impl<'a> TryFrom<&'a ScalarValue> for String {
type Error = ();
fn try_from(value: &'a ScalarValue) -> Result<Self, Self::Error> {
match value {
ScalarValue::String(v) => Ok(v.clone()),
_ => Err(()),
}
}
}
=======
impl<'a> TryFrom<&'a ScalarValue> for String {
type Error = ();
fn try_from(value: &'a ScalarValue) -> Result<Self, Self::Error> {
match value {
ScalarValue::String(v) => Ok(v.clone()),
_ => Err(()),
}
}
}
impl<'a> TryFrom<&'a ScalarValue> for &'a str {
type Error = ();
fn try_from(value: &'a ScalarValue) -> Result<Self, Self::Error> {
match value {
ScalarValue::String(v) => Ok(v.as_str()),
_ => Err(()),
}
}
}
>>>>>>> REPLACE