Skip to content

Commit

Permalink
zb: Relax type bound on call/call_with_flags
Browse files Browse the repository at this point in the history
Because there is a blanket impl of DynamicDeserialize for any type that
implements Type + Deserialize, any call that was previously allowed will
still be allowed after this change.
  • Loading branch information
danieldg committed Jan 18, 2024
1 parent df2cf6f commit 810784a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions zbus/src/blocking/proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl<'a> Proxy<'a> {
M: TryInto<MemberName<'m>>,
M::Error: Into<Error>,
B: serde::ser::Serialize + zvariant::DynamicType,
R: serde::de::DeserializeOwned + zvariant::Type,
R: for<'d> zvariant::DynamicDeserialize<'d>,
{
block_on(self.inner().call(method_name, body))
}
Expand All @@ -251,7 +251,7 @@ impl<'a> Proxy<'a> {
M: TryInto<MemberName<'m>>,
M::Error: Into<Error>,
B: serde::ser::Serialize + zvariant::DynamicType,
R: serde::de::DeserializeOwned + zvariant::Type,
R: for<'d> zvariant::DynamicDeserialize<'d>,
{
block_on(self.inner().call_with_flags(method_name, flags, body))
}
Expand Down
4 changes: 2 additions & 2 deletions zbus/src/proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ impl<'a> Proxy<'a> {
M: TryInto<MemberName<'m>>,
M::Error: Into<Error>,
B: serde::ser::Serialize + zvariant::DynamicType,
R: serde::de::DeserializeOwned + zvariant::Type,
R: for<'d> zvariant::DynamicDeserialize<'d>,
{
let reply = self.call_method(method_name, body).await?;

Expand All @@ -866,7 +866,7 @@ impl<'a> Proxy<'a> {
M: TryInto<MemberName<'m>>,
M::Error: Into<Error>,
B: serde::ser::Serialize + zvariant::DynamicType,
R: serde::de::DeserializeOwned + zvariant::Type,
R: for<'d> zvariant::DynamicDeserialize<'d>,
{
let flags = flags.iter().map(Flags::from).collect::<BitFlags<_>>();
match self
Expand Down

0 comments on commit 810784a

Please sign in to comment.