Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix lint
  • Loading branch information
pgherveou committed Mar 24, 2023
commit 011503a708acf11aeee879a2afd0a29eff791159
6 changes: 2 additions & 4 deletions frame/contracts/proc-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,19 +643,17 @@ fn expand_functions(def: &EnvDef, expand_blocks: bool, host_state: TokenStream2)
{
use sp_std::fmt::Write;
let mut w = sp_std::Writer::default();
let _ = ::core::write!(&mut w, #debug_buffer_fmt_str, #( #debug_buffer_fmt_args, )* result);
let _ = core::write!(&mut w, #debug_buffer_fmt_str, #( #debug_buffer_fmt_args, )* result);
let msg = core::str::from_utf8(&w.inner()).unwrap_or_default();
ctx.ext.append_debug_buffer(msg);
}
result

} else {
#body
}
}
}
};


// If we don't expand blocks (implementing for `()`) we change a few things:
// - We replace any code by unreachable!
// - Allow unused variables as the code that uses is not expanded
Expand Down