mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 23:31:07 +00:00
Update to 2024 edition (#2001)
* Update to 2024 edition * Update to 2024 edition; fmt, use<> and remove refs * async functions
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
use crate::rpc::RpcResponse;
|
||||
use crate::shared_client::SharedClient;
|
||||
use crate::{JsonRpcError, LightClientRpcError};
|
||||
use futures::{stream::StreamExt, FutureExt};
|
||||
use futures::{FutureExt, stream::StreamExt};
|
||||
use serde_json::value::RawValue;
|
||||
use smoldot_light::platform::PlatformRef;
|
||||
use std::{collections::HashMap, str::FromStr};
|
||||
|
||||
@@ -11,7 +11,7 @@ mod wasm_platform;
|
||||
#[cfg(feature = "web")]
|
||||
mod wasm_socket;
|
||||
|
||||
pub use helpers::{build_platform, DefaultPlatform};
|
||||
pub use helpers::{DefaultPlatform, build_platform};
|
||||
|
||||
#[cfg(feature = "native")]
|
||||
mod helpers {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
use super::wasm_socket::WasmSocket;
|
||||
|
||||
use core::time::Duration;
|
||||
use futures_util::{future, FutureExt};
|
||||
use futures_util::{FutureExt, future};
|
||||
|
||||
pub fn now_from_unix_epoch() -> Duration {
|
||||
web_time::SystemTime::now()
|
||||
|
||||
@@ -141,7 +141,9 @@ impl PlatformRef for SubxtPlatform {
|
||||
// The API user of the `PlatformRef` trait is never supposed to open connections of
|
||||
// a type that isn't supported.
|
||||
_ => {
|
||||
unreachable!("Connecting to an address not supported. This code path indicates a bug in smoldot. Please raise an issue at https://github.com/smol-dot/smoldot/issues")
|
||||
unreachable!(
|
||||
"Connecting to an address not supported. This code path indicates a bug in smoldot. Please raise an issue at https://github.com/smol-dot/smoldot/issues"
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
@@ -157,7 +159,9 @@ impl PlatformRef for SubxtPlatform {
|
||||
}
|
||||
|
||||
fn connect_multistream(&self, _address: MultiStreamAddress) -> Self::MultiStreamConnectFuture {
|
||||
panic!("Multistreams are not currently supported. This code path indicates a bug in smoldot. Please raise an issue at https://github.com/smol-dot/smoldot/issues")
|
||||
panic!(
|
||||
"Multistreams are not currently supported. This code path indicates a bug in smoldot. Please raise an issue at https://github.com/smol-dot/smoldot/issues"
|
||||
)
|
||||
}
|
||||
|
||||
fn open_out_substream(&self, c: &mut Self::MultiStream) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
use futures::{io, prelude::*};
|
||||
use send_wrapper::SendWrapper;
|
||||
use wasm_bindgen::{prelude::*, JsCast};
|
||||
use wasm_bindgen::{JsCast, prelude::*};
|
||||
|
||||
use std::{
|
||||
collections::VecDeque,
|
||||
|
||||
Reference in New Issue
Block a user