mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 02:15:43 +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:
@@ -80,7 +80,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||||||
// implementation changes and behavior does not, then leave spec_version as
|
// implementation changes and behavior does not, then leave spec_version as
|
||||||
// is and increment impl_version.
|
// is and increment impl_version.
|
||||||
spec_version: 214,
|
spec_version: 214,
|
||||||
impl_version: 2,
|
impl_version: 3,
|
||||||
apis: RUNTIME_API_VERSIONS,
|
apis: RUNTIME_API_VERSIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -129,10 +129,12 @@ pub mod native {
|
|||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! runtime_print {
|
macro_rules! runtime_print {
|
||||||
($($arg:tt)+) => {
|
($($arg:tt)+) => {
|
||||||
use core::fmt::Write;
|
{
|
||||||
let mut w = $crate::debug::Writer::default();
|
use core::fmt::Write;
|
||||||
let _ = core::write!(&mut w, $($arg)+);
|
let mut w = $crate::debug::Writer::default();
|
||||||
w.print();
|
let _ = core::write!(&mut w, $($arg)+);
|
||||||
|
w.print();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user