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

Commit

Permalink
Convert another location
Browse files Browse the repository at this point in the history
  • Loading branch information
MOZGIII committed Jun 1, 2021
1 parent 6927e0a commit 55be441
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frame/support/procedural/src/construct_runtime/expand/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ pub fn expand_outer_origin(
}
}

impl Into<#scrate::sp_std::result::Result<#system_path::Origin<#runtime>, Origin>> for Origin {
impl From<Origin> for #scrate::sp_std::result::Result<#system_path::Origin<#runtime>, Origin> {
/// NOTE: converting to pallet origin loses the origin filter information.
fn into(self) -> #scrate::sp_std::result::Result<#system_path::Origin<#runtime>, Self> {
if let OriginCaller::system(l) = self.caller {
fn from(val: Origin) -> Self {
if let OriginCaller::system(l) = val.caller {
Ok(l)
} else {
Err(self)
Expand Down Expand Up @@ -314,10 +314,10 @@ fn expand_origin_pallet_conversions(
}
}

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

0 comments on commit 55be441

Please sign in to comment.