clippy: Remove unneeded ?Sized bound and replace never type with () (#1758)

* storage: Remove ?Sized bound

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* backend: Use () instead of !

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* backend: Return directly

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2024-09-06 18:14:40 +03:00
committed by GitHub
parent b8735e5782
commit 2471aefe3b
3 changed files with 5 additions and 12 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ impl<K: codec::Encode + ?Sized> StaticStorageKey<K> {
}
}
impl<K: codec::Decode + ?Sized> StaticStorageKey<K> {
impl<K: codec::Decode> StaticStorageKey<K> {
/// Decodes the encoded inner bytes into the type `K`.
pub fn decoded(&self) -> Result<K, Error> {
let decoded = K::decode(&mut self.bytes())?;