mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-29 17:15:43 +00:00
Fix warnings when compiling runtime. (#4332)
* Remove warnings when compiling runtime. * Remove dispatch::Result imports. * Add missing imports. * Fix missing vecs. #4333 * Fix oom function. * Remove superfluous import. * More warnings.
This commit is contained in:
committed by
Bastian Köcher
parent
057e298b1f
commit
1f84d6d41d
@@ -770,6 +770,7 @@ mod allocator_impl {
|
||||
}
|
||||
}
|
||||
|
||||
/// A default panic handler for WASM environment.
|
||||
#[cfg(all(not(feature = "disable_panic_handler"), not(feature = "std")))]
|
||||
#[panic_handler]
|
||||
#[no_mangle]
|
||||
@@ -781,9 +782,10 @@ pub fn panic(info: &core::panic::PanicInfo) -> ! {
|
||||
}
|
||||
}
|
||||
|
||||
/// A default OOM handler for WASM environment.
|
||||
#[cfg(all(not(feature = "disable_oom"), not(feature = "std")))]
|
||||
#[alloc_error_handler]
|
||||
pub extern fn oom(_: core::alloc::Layout) -> ! {
|
||||
pub fn oom(_: core::alloc::Layout) -> ! {
|
||||
unsafe {
|
||||
logging::log(LogLevel::Error, "runtime", b"Runtime memory exhausted. Aborting");
|
||||
core::intrinsics::abort();
|
||||
|
||||
Reference in New Issue
Block a user