working on key

This commit is contained in:
open-trade
2020-07-09 00:56:30 +08:00
parent 135d855505
commit d837379a13
4 changed files with 307 additions and 176 deletions

View File

@@ -79,7 +79,7 @@ impl SledAsync {
}
#[inline]
pub fn _deserialize<'a, T: serde::Deserialize<'a>>(v: &'a Option<sled::IVec>) -> Option<T> {
pub fn deserialize<'a, T: serde::Deserialize<'a>>(v: &'a Option<sled::IVec>) -> Option<T> {
if let Some(v) = v {
if let Ok(v) = std::str::from_utf8(v) {
if let Ok(v) = serde_json::from_str::<T>(&v) {