mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 16:21:06 +00:00
Convert another instance of Into impl to From in the macros (#8986)
* Convert another instance of Into impl to From in the macros * Convert another location
This commit is contained in:
@@ -382,21 +382,17 @@ macro_rules! impl_outer_origin {
|
||||
x.into()
|
||||
}
|
||||
}
|
||||
impl Into<
|
||||
$crate::sp_std::result::Result<
|
||||
impl From<$name> for $crate::sp_std::result::Result<
|
||||
$module::Origin < $( $generic )? $(, $module::$generic_instance )? >,
|
||||
$name,
|
||||
>>
|
||||
for $name {
|
||||
>
|
||||
{
|
||||
/// NOTE: converting to pallet origin loses the origin filter information.
|
||||
fn into(self) -> $crate::sp_std::result::Result<
|
||||
$module::Origin < $( $generic )? $(, $module::$generic_instance )? >,
|
||||
Self,
|
||||
> {
|
||||
if let $caller_name::[< $module $( _ $generic_instance )? >](l) = self.caller {
|
||||
fn from(val: $name) -> Self {
|
||||
if let $caller_name::[< $module $( _ $generic_instance )? >](l) = val.caller {
|
||||
Ok(l)
|
||||
} else {
|
||||
Err(self)
|
||||
Err(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user