Skip to content

Commit 470a73f

Browse files
committed
clippy
1 parent a0af732 commit 470a73f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pallets/proxy/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -836,10 +836,7 @@ impl<T: Config> Pallet<T> {
836836
force_proxy_type: Option<T::ProxyType>,
837837
) -> Result<ProxyDefinition<T::AccountId, T::ProxyType, BlockNumberFor<T>>, DispatchError> {
838838
let f = |x: &ProxyDefinition<T::AccountId, T::ProxyType, BlockNumberFor<T>>| -> bool {
839-
&x.delegate == delegate
840-
&& force_proxy_type
841-
.as_ref()
842-
.map_or(true, |y| &x.proxy_type == y)
839+
&x.delegate == delegate && force_proxy_type.as_ref().is_none_or(|y| &x.proxy_type == y)
843840
};
844841
Ok(Proxies::<T>::get(real)
845842
.0

0 commit comments

Comments
 (0)