mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 19:47:59 +00:00
Wrap runtime_print! macro in its own scope (#4867)
* Wrap runtime_print! macro in its own scope Before this fix runtime_print! can be used only once in a scope because of the name pollution. * Bump runtime impl versioin (no logic change)
This commit is contained in:
@@ -129,10 +129,12 @@ pub mod native {
|
||||
#[macro_export]
|
||||
macro_rules! runtime_print {
|
||||
($($arg:tt)+) => {
|
||||
use core::fmt::Write;
|
||||
let mut w = $crate::debug::Writer::default();
|
||||
let _ = core::write!(&mut w, $($arg)+);
|
||||
w.print();
|
||||
{
|
||||
use core::fmt::Write;
|
||||
let mut w = $crate::debug::Writer::default();
|
||||
let _ = core::write!(&mut w, $($arg)+);
|
||||
w.print();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user