Fix cheap clone Bytes and Overwatch crate name update
This commit is contained in:
parent
3a15a9b722
commit
c127c1d18d
|
@ -8,7 +8,7 @@ edition = "2021"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
bytes = "1.2"
|
bytes = "1.2"
|
||||||
overwatch = { git = "https://github.com/logos-co/Overwatch", branch = "main" }
|
overwatch-rs = { git = "https://github.com/logos-co/Overwatch", branch = "main" }
|
||||||
multiaddr = "0.15"
|
multiaddr = "0.15"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
sled = { version = "0.34", optional = true }
|
sled = { version = "0.34", optional = true }
|
||||||
|
|
|
@ -46,7 +46,7 @@ impl<SerdeOp: StorageSerde + Send + Sync + 'static> StorageBackend for MockStora
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn load(&mut self, key: &[u8]) -> Result<Option<Bytes>, Self::Error> {
|
async fn load(&mut self, key: &[u8]) -> Result<Option<Bytes>, Self::Error> {
|
||||||
Ok(self.inner.get(key).map(|b| Bytes::copy_from_slice(b)))
|
Ok(self.inner.get(key).map(|b| b.clone()))
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn remove(&mut self, key: &[u8]) -> Result<Option<Bytes>, Self::Error> {
|
async fn remove(&mut self, key: &[u8]) -> Result<Option<Bytes>, Self::Error> {
|
||||||
|
|
Loading…
Reference in New Issue