mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Fix tons of warnings in newest nightly (#2784)
* Fix tons of warnings in newest nightly * Fix sr-api-macro doc tests
This commit is contained in:
@@ -107,7 +107,7 @@ fn safe_call<F, U>(f: F) -> Result<U>
|
||||
/// Set up the externalities and safe calling environment to execute calls to a native runtime.
|
||||
///
|
||||
/// If the inner closure panics, it will be caught and return an error.
|
||||
pub fn with_native_environment<F, U>(ext: &mut Externalities<Blake2Hasher>, f: F) -> Result<U>
|
||||
pub fn with_native_environment<F, U>(ext: &mut dyn Externalities<Blake2Hasher>, f: F) -> Result<U>
|
||||
where F: UnwindSafe + FnOnce() -> U
|
||||
{
|
||||
::runtime_io::with_externalities(ext, move || safe_call(f))
|
||||
@@ -121,7 +121,7 @@ pub trait NativeExecutionDispatch: Send + Sync {
|
||||
/// Dispatch a method and input data to be executed natively. Returns `Some` result or `None`
|
||||
/// if the `method` is unknown. Panics if there's an unrecoverable error.
|
||||
// fn dispatch<H: hash_db::Hasher>(ext: &mut Externalities<H>, method: &str, data: &[u8]) -> Result<Vec<u8>>;
|
||||
fn dispatch(ext: &mut Externalities<Blake2Hasher>, method: &str, data: &[u8]) -> Result<Vec<u8>>;
|
||||
fn dispatch(ext: &mut dyn Externalities<Blake2Hasher>, method: &str, data: &[u8]) -> Result<Vec<u8>>;
|
||||
|
||||
/// Provide native runtime version.
|
||||
fn native_version() -> NativeVersion;
|
||||
|
||||
@@ -1101,7 +1101,7 @@ impl WasmExecutor {
|
||||
/// This should be used for tests only.
|
||||
pub fn call_with_custom_signature<
|
||||
E: Externalities<Blake2Hasher>,
|
||||
F: FnOnce(&mut FnMut(&[u8]) -> Result<u32>) -> Result<Vec<RuntimeValue>>,
|
||||
F: FnOnce(&mut dyn FnMut(&[u8]) -> Result<u32>) -> Result<Vec<RuntimeValue>>,
|
||||
FR: FnOnce(Option<RuntimeValue>, &MemoryRef) -> Result<Option<R>>,
|
||||
R,
|
||||
>(
|
||||
@@ -1158,7 +1158,7 @@ impl WasmExecutor {
|
||||
/// Call a given method in the given wasm-module runtime.
|
||||
fn call_in_wasm_module_with_custom_signature<
|
||||
E: Externalities<Blake2Hasher>,
|
||||
F: FnOnce(&mut FnMut(&[u8]) -> Result<u32>) -> Result<Vec<RuntimeValue>>,
|
||||
F: FnOnce(&mut dyn FnMut(&[u8]) -> Result<u32>) -> Result<Vec<RuntimeValue>>,
|
||||
FR: FnOnce(Option<RuntimeValue>, &MemoryRef) -> Result<Option<R>>,
|
||||
R,
|
||||
>(
|
||||
|
||||
@@ -174,7 +174,7 @@ macro_rules! impl_function_executor {
|
||||
=> $($pre:tt)+ ) => (
|
||||
impl $( $pre ) + $structname {
|
||||
#[allow(unused)]
|
||||
fn resolver() -> &'static $crate::wasmi::ModuleImportResolver {
|
||||
fn resolver() -> &'static dyn $crate::wasmi::ModuleImportResolver {
|
||||
struct Resolver;
|
||||
impl $crate::wasmi::ModuleImportResolver for Resolver {
|
||||
fn resolve_func(&self, name: &str, signature: &$crate::wasmi::Signature) -> ::std::result::Result<$crate::wasmi::FuncRef, $crate::wasmi::Error> {
|
||||
|
||||
Reference in New Issue
Block a user