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

Commit 336f993

Browse files
committed
Convert another location
1 parent 6927e0a commit 336f993

File tree

1 file changed

+8
-8
lines changed
  • frame/support/procedural/src/construct_runtime/expand

1 file changed

+8
-8
lines changed

frame/support/procedural/src/construct_runtime/expand/origin.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ pub fn expand_outer_origin(
227227
}
228228
}
229229

230-
impl Into<#scrate::sp_std::result::Result<#system_path::Origin<#runtime>, Origin>> for Origin {
230+
impl From<Origin> for #scrate::sp_std::result::Result<#system_path::Origin<#runtime>, Origin> {
231231
/// NOTE: converting to pallet origin loses the origin filter information.
232-
fn into(self) -> #scrate::sp_std::result::Result<#system_path::Origin<#runtime>, Self> {
233-
if let OriginCaller::system(l) = self.caller {
232+
fn from(val: Origin) -> Self {
233+
if let OriginCaller::system(l) = val.caller {
234234
Ok(l)
235235
} else {
236-
Err(self)
236+
Err(val)
237237
}
238238
}
239239
}
@@ -314,13 +314,13 @@ fn expand_origin_pallet_conversions(
314314
}
315315
}
316316

317-
impl Into<#scrate::sp_std::result::Result<#pallet_origin, Origin>> for Origin {
317+
impl From<Origin> for #scrate::sp_std::result::Result<#pallet_origin, Origin> {
318318
/// NOTE: converting to pallet origin loses the origin filter information.
319-
fn into(self) -> #scrate::sp_std::result::Result<#pallet_origin, Self> {
320-
if let OriginCaller::#variant(l) = self.caller {
319+
fn from(val: Origin) -> Self {
320+
if let OriginCaller::#variant(l) = val.caller {
321321
Ok(l)
322322
} else {
323-
Err(self)
323+
Err(val)
324324
}
325325
}
326326
}

0 commit comments

Comments
 (0)