Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Convert Into to From to make clippy happy (#8900)
Browse files Browse the repository at this point in the history
  • Loading branch information
MOZGIII committed May 26, 2021
1 parent 7fe74c4 commit 2c713b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frame/support/src/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,13 @@ macro_rules! impl_outer_origin {
}
}

impl Into<$crate::sp_std::result::Result<$system::Origin<$runtime>, $name>> for $name {
impl From<$name> for $crate::sp_std::result::Result<$system::Origin<$runtime>, $name>{
/// NOTE: converting to pallet origin loses the origin filter information.
fn into(self) -> $crate::sp_std::result::Result<$system::Origin<$runtime>, Self> {
if let $caller_name::system(l) = self.caller {
fn from(val: $name) -> Self {
if let $caller_name::system(l) = val.caller {
Ok(l)
} else {
Err(self)
Err(val)
}
}
}
Expand Down

0 comments on commit 2c713b5

Please sign in to comment.