diff --git a/rust-app/src/implementation.rs b/rust-app/src/implementation.rs index dc9c0c8..70c3429 100644 --- a/rust-app/src/implementation.rs +++ b/rust-app/src/implementation.rs @@ -161,13 +161,25 @@ impl AsyncParser for DefaultInterp { ) .await; } - _ => reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await, + _ => { + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await + } } CallArg::ObjectArg } _ => { trace!("CallArgSchema: Unknown enum: {}", enum_variant); - reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await } } } @@ -223,7 +235,12 @@ impl AsyncParser for DefaultInterp { } _ => { trace!("CommandSchema: Unknown enum: {}", enum_variant); - reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await } } } @@ -275,7 +292,14 @@ impl AsyncParser for DefaultInterp { .await, ) } - _ => reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await, + _ => { + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await + } } } } @@ -316,13 +340,27 @@ impl AsyncParser reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await, + _ => { + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await + } }, CallArg::Amount(amt) => { #[allow(clippy::single_match)] match amounts.try_push((amt, i)) { - Err(_) => reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await, + Err(_) => { + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await + } _ => {} } } @@ -332,7 +370,12 @@ impl AsyncParser(core::file!(), core::line!(), SyscallError::NotSupported as u16).await; + reject_on::<()>( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await; } let mut verified_recipient = false; @@ -352,23 +395,47 @@ impl AsyncParser { if verified_recipient { // Reject more than one TransferObject(s) - reject_on::<()>(core::file!(), core::line!(), SyscallError::NotSupported as u16).await; + reject_on::<()>( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await; } match recipient_input { Argument::Input(inp_index) => { if Some(inp_index as u32) != recipient_index { trace!("TransferObject recipient mismatch"); - reject_on::<()>(core::file!(), core::line!(), SyscallError::NotSupported as u16).await; + reject_on::<()>( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await; } verified_recipient = true; } - _ => reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await, + _ => { + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await + } } } Command::SplitCoins(coin, input_indices) => { match coin { Argument::GasCoin => {} - _ => reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await, + _ => { + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await + } } for arg in &input_indices { match arg { @@ -378,14 +445,25 @@ impl AsyncParser total_amount = t, None => { - reject_on(core::file!(), core::line!(), SyscallError::InvalidParameter as u16) - .await + reject_on( + core::file!(), + core::line!(), + SyscallError::InvalidParameter as u16, + ) + .await } } } } } - _ => reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await, + _ => { + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await + } } } } @@ -394,7 +472,12 @@ impl AsyncParser(core::file!(), core::line!(), SyscallError::NotSupported as u16).await; + reject_on::<()>( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await; } if PROMPT @@ -444,7 +527,12 @@ impl AsyncParser { trace!("TransactionKind: {}", enum_variant); - reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await } } } @@ -492,7 +580,14 @@ impl AsyncParser for DefaultInt trace!("TransactionExpiration: Epoch"); >::parse(&DefaultInterp, input).await; } - _ => reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await, + _ => { + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await + } } } } @@ -568,7 +663,14 @@ impl AsyncParser().parse(input).await; } - _ => reject_on(core::file!(), core::line!(), SyscallError::NotSupported as u16).await, + _ => { + reject_on( + core::file!(), + core::line!(), + SyscallError::NotSupported as u16, + ) + .await + } } } }