From f42ef4bec6d1c63c0d8564cfb06e996666dedbe3 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sat, 21 Feb 2026 14:35:01 +0100 Subject: clean up clippy lints --- src/message/signalproxy/rpccall/client.rs | 2 +- src/message/signalproxy/rpccall/identity.rs | 4 ++-- src/message/signalproxy/rpccall/mod.rs | 4 ++-- src/message/signalproxy/rpccall/network.rs | 6 +++--- src/message/signalproxy/rpccall/passwordchange.rs | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/message/signalproxy/rpccall') diff --git a/src/message/signalproxy/rpccall/client.rs b/src/message/signalproxy/rpccall/client.rs index 818b32c..7e31135 100644 --- a/src/message/signalproxy/rpccall/client.rs +++ b/src/message/signalproxy/rpccall/client.rs @@ -15,7 +15,7 @@ impl RpcCallType for KickClient { fn to_network(&self) -> Result, crate::ProtocolError> { Ok(vec![ Variant::ByteArray(Self::NAME.to_string()), - self.id.clone().into(), + self.id.into(), ]) } diff --git a/src/message/signalproxy/rpccall/identity.rs b/src/message/signalproxy/rpccall/identity.rs index 1672e98..15beec4 100644 --- a/src/message/signalproxy/rpccall/identity.rs +++ b/src/message/signalproxy/rpccall/identity.rs @@ -54,7 +54,7 @@ impl RpcCallType for RemoveIdentity { fn to_network(&self) -> Result, crate::ProtocolError> { Ok(vec![ Variant::ByteArray(Self::NAME.to_string()), - Variant::IdentityId(self.identity_id.clone()), + Variant::IdentityId(self.identity_id), ]) } @@ -120,7 +120,7 @@ impl RpcCallType for IdentityRemoved { fn to_network(&self) -> Result, crate::ProtocolError> { Ok(vec![ Variant::ByteArray(Self::NAME.to_string()), - Variant::IdentityId(self.identity_id.clone()), + Variant::IdentityId(self.identity_id), ]) } diff --git a/src/message/signalproxy/rpccall/mod.rs b/src/message/signalproxy/rpccall/mod.rs index c30d462..2a3e7b1 100644 --- a/src/message/signalproxy/rpccall/mod.rs +++ b/src/message/signalproxy/rpccall/mod.rs @@ -106,7 +106,7 @@ impl Serialize for RpcCall { impl Deserialize for RpcCall { fn parse(b: &[std::primitive::u8]) -> Result<(std::primitive::usize, Self), ProtocolError> { - let (size, mut res) = VariantList::parse(&b)?; + let (size, mut res) = VariantList::parse(b)?; res.remove(0); @@ -130,7 +130,7 @@ impl Deserialize for RpcCall { DisconnectFromCore::NAME => DisconnectFromCore::from_network(size, &mut res), ObjectRenamed::NAME => ObjectRenamed::from_network(size, &mut res), BufferInfoUpdated::NAME => BufferInfoUpdated::from_network(size, &mut res), - _ => return Ok((size, RpcCall::NotImplemented)), + _ => Ok((size, RpcCall::NotImplemented)), } } } diff --git a/src/message/signalproxy/rpccall/network.rs b/src/message/signalproxy/rpccall/network.rs index aeb3f80..738dddf 100644 --- a/src/message/signalproxy/rpccall/network.rs +++ b/src/message/signalproxy/rpccall/network.rs @@ -53,7 +53,7 @@ impl RpcCallType for RemoveNetwork { fn to_network(&self) -> Result, crate::ProtocolError> { Ok(vec![ Variant::ByteArray(Self::NAME.to_string()), - self.network_id.clone().into(), + self.network_id.into(), ]) } @@ -86,7 +86,7 @@ impl RpcCallType for NetworkCreated { fn to_network(&self) -> Result, crate::ProtocolError> { Ok(vec![ Variant::ByteArray(Self::NAME.to_string()), - self.network_id.clone().into(), + self.network_id.into(), ]) } @@ -119,7 +119,7 @@ impl RpcCallType for NetworkRemoved { fn to_network(&self) -> Result, crate::ProtocolError> { Ok(vec![ Variant::ByteArray(Self::NAME.to_string()), - self.network_id.clone().into(), + self.network_id.into(), ]) } diff --git a/src/message/signalproxy/rpccall/passwordchange.rs b/src/message/signalproxy/rpccall/passwordchange.rs index b96b926..16bf78f 100644 --- a/src/message/signalproxy/rpccall/passwordchange.rs +++ b/src/message/signalproxy/rpccall/passwordchange.rs @@ -21,7 +21,7 @@ impl RpcCallType for ChangePassword { fn to_network(&self) -> Result, crate::ProtocolError> { Ok(vec![ Variant::ByteArray(Self::NAME.to_string()), - self.peer.clone().into(), + self.peer.into(), self.user.clone().into(), self.before.clone().into(), self.after.clone().into(), @@ -64,8 +64,8 @@ impl RpcCallType for PasswordChanged { fn to_network(&self) -> Result, crate::ProtocolError> { Ok(vec![ Variant::ByteArray(Self::NAME.to_string()), - self.peer.clone().into(), - self.success.clone().into(), + self.peer.into(), + self.success.into(), ]) } -- cgit v1.2.3