Skip to content

Commit

Permalink
Fix unused output warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ascjones committed Dec 12, 2024
1 parent a1fbb03 commit 65108d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/env/src/call/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub mod utils {
#[cfg(not(feature = "revive"))]
pub use self::{
call_builder::CallV1,
create_builder::LimitParamsV1
create_builder::LimitParamsV1,
};
pub use self::{
call_builder::{
Expand Down
22 changes: 12 additions & 10 deletions crates/ink/codegen/src/generator/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,18 @@ impl Dispatch<'_> {
let rlp_return_value = message
.output()
.map(|_| quote! {
::ink::env::return_value_rlp::<Self::Output>(flags, &output)
})
|flags, output| {
::ink::env::return_value_rlp::<Self::Output>(flags, &output)
};
})
.unwrap_or_else(|| quote! {
::ink::env::return_value_rlp::<::ink::reflect::RlpUnit>(
flags,
&::ink::reflect::RlpUnit {}
)
});
|flags, _output| {
::ink::env::return_value_rlp::<::ink::reflect::RlpUnit>(
flags,
&::ink::reflect::RlpUnit {}
)
};
});

message_infos.push(quote_spanned!(message_span=>
#( #cfg_attrs )*
Expand All @@ -379,9 +383,7 @@ impl Dispatch<'_> {
const DECODE: fn(&mut &[::core::primitive::u8]) -> ::core::result::Result<Self::Input, ::ink::env::DispatchError> =
#rlp_decode
const RETURN: fn(::ink::env::ReturnFlags, Self::Output) -> ! =
|flags, output| {
#rlp_return_value
};
#rlp_return_value
const SELECTOR: [::core::primitive::u8; 4usize] = [ #( #rlp_selector_bytes ),* ];
const PAYABLE: ::core::primitive::bool = #payable;
const MUTATES: ::core::primitive::bool = #mutates;
Expand Down

0 comments on commit 65108d7

Please sign in to comment.