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

Commit 2c713b5

Browse files
authored
Convert Into to From to make clippy happy (#8900)
1 parent 7fe74c4 commit 2c713b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frame/support/src/origin.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ macro_rules! impl_outer_origin {
349349
}
350350
}
351351

352-
impl Into<$crate::sp_std::result::Result<$system::Origin<$runtime>, $name>> for $name {
352+
impl From<$name> for $crate::sp_std::result::Result<$system::Origin<$runtime>, $name>{
353353
/// NOTE: converting to pallet origin loses the origin filter information.
354-
fn into(self) -> $crate::sp_std::result::Result<$system::Origin<$runtime>, Self> {
355-
if let $caller_name::system(l) = self.caller {
354+
fn from(val: $name) -> Self {
355+
if let $caller_name::system(l) = val.caller {
356356
Ok(l)
357357
} else {
358-
Err(self)
358+
Err(val)
359359
}
360360
}
361361
}

0 commit comments

Comments
 (0)