|
@@ -1,5 +1,4 @@
|
|
|
use std::{collections::HashMap, fmt::Display};
|
|
|
-use tokio::select;
|
|
|
|
|
|
use crate::Shared;
|
|
|
|
|
@@ -34,7 +33,7 @@ impl Display for Data {
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
match self {
|
|
|
Self::None => f.write_str("None"),
|
|
|
- Self::String(s) => f.write_str(&s),
|
|
|
+ Self::String(s) => f.write_str(s),
|
|
|
Self::I8(i) => f.write_str(format!("{}", i).as_str()),
|
|
|
Self::I16(i) => f.write_str(format!("{}", i).as_str()),
|
|
|
Self::I32(i) => f.write_str(format!("{}", i).as_str()),
|
|
@@ -56,7 +55,7 @@ impl Display for Data {
|
|
|
}
|
|
|
out.push_str(format!("{}", d).as_str());
|
|
|
}
|
|
|
- out.push_str("]");
|
|
|
+ out.push(']');
|
|
|
f.write_str(out.as_str())
|
|
|
},
|
|
|
Self::HashMap(hm) => {
|
|
@@ -67,7 +66,7 @@ impl Display for Data {
|
|
|
}
|
|
|
out.push_str(format!("{}: {}", k, v).as_str());
|
|
|
}
|
|
|
- out.push_str("}");
|
|
|
+ out.push('}');
|
|
|
f.write_str(out.as_str())
|
|
|
},
|
|
|
}
|
|
@@ -330,9 +329,9 @@ impl TryInto<HashMap<String, Data>> for Data {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-impl Into<Shared<Data>> for Data {
|
|
|
- fn into(self) -> Shared<Data> {
|
|
|
- Shared::new(self)
|
|
|
+impl From<Data> for Shared<Data> {
|
|
|
+ fn from(val: Data) -> Self {
|
|
|
+ Shared::new(val)
|
|
|
}
|
|
|
}
|
|
|
|