feat: add to_value implementation for &str
This commit is contained in:
@@ -2,5 +2,6 @@ pub mod bool_to_value;
|
|||||||
pub mod entity_to_value;
|
pub mod entity_to_value;
|
||||||
pub mod f64_to_value;
|
pub mod f64_to_value;
|
||||||
pub mod i64_to_value;
|
pub mod i64_to_value;
|
||||||
|
pub mod str_to_value;
|
||||||
pub mod string_to_value;
|
pub mod string_to_value;
|
||||||
pub mod u64_to_value;
|
pub mod u64_to_value;
|
||||||
|
|||||||
10
01.workspace/heave/src/imp/str_to_value.rs
Normal file
10
01.workspace/heave/src/imp/str_to_value.rs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
use crate::*;
|
||||||
|
|
||||||
|
impl ToValue for &str {
|
||||||
|
fn to_value(self) -> Value {
|
||||||
|
Value::Text(String::from(self))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// #[cfg(test)]
|
||||||
|
// mod unit_tests { use super::*; }
|
||||||
Reference in New Issue
Block a user