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]
|
||||
async-trait = "0.1"
|
||||
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"
|
||||
serde = "1.0"
|
||||
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> {
|
||||
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> {
|
||||
|
|
Loading…
Reference in New Issue