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 authored and GitHub committed 2024-09-06 17:14:40 +02:00
1 parent b8735e5782
commit 2471aefe3b
3 files changed
+5 -12

No files matched your search

+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())?;