Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/storage/storage_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())?;
Expand Down
4 changes: 3 additions & 1 deletion subxt/src/backend/legacy/rpc_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ impl<T: Config> LegacyRpcMethods<T> {
public: Vec<u8>,
) -> Result<(), Error> {
let params = rpc_params![key_type, suri, Bytes(public)];
self.client.request("author_insertKey", params).await?;
self.client
niklasad1 marked this conversation as resolved.
Show resolved Hide resolved
.request::<()>("author_insertKey", params)
.await?;
Ok(())
}

Expand Down
6 changes: 3 additions & 3 deletions subxt/src/backend/unstable/rpc_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl<T: Config> UnstableRpcMethods<T> {
operation_id: &str,
) -> Result<(), Error> {
self.client
.request(
.request::<()>(
"chainHead_v1_continue",
rpc_params![follow_subscription, operation_id],
)
Expand All @@ -93,7 +93,7 @@ impl<T: Config> UnstableRpcMethods<T> {
operation_id: &str,
) -> Result<(), Error> {
self.client
.request(
.request::<()>(
"chainHead_v1_stopOperation",
rpc_params![follow_subscription, operation_id],
)
Expand Down Expand Up @@ -221,7 +221,7 @@ impl<T: Config> UnstableRpcMethods<T> {
hash: T::Hash,
) -> Result<(), Error> {
self.client
.request("chainHead_v1_unpin", rpc_params![subscription_id, hash])
.request::<()>("chainHead_v1_unpin", rpc_params![subscription_id, hash])
.await?;

Ok(())
Expand Down
Loading