mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Remove the last bits of unknown_os in the code base (#9718)
* Remove the last bits of unknown_os in the code base * Fmt
This commit is contained in:
@@ -39,7 +39,6 @@ use std::{collections::HashMap, io, net::SocketAddr, pin::Pin, task::Poll};
|
||||
use codec::{Decode, Encode};
|
||||
use futures::{stream, Future, FutureExt, Stream, StreamExt};
|
||||
use log::{debug, error, warn};
|
||||
use parity_util_mem::MallocSizeOf;
|
||||
use sc_network::PeerId;
|
||||
use sc_utils::mpsc::TracingUnboundedReceiver;
|
||||
use sp_runtime::{
|
||||
@@ -81,16 +80,6 @@ pub use task_manager::{SpawnTaskHandle, TaskManager};
|
||||
|
||||
const DEFAULT_PROTOCOL_ID: &str = "sup";
|
||||
|
||||
/// A type that implements `MallocSizeOf` on native but not wasm.
|
||||
#[cfg(not(target_os = "unknown"))]
|
||||
pub trait MallocSizeOfWasm: MallocSizeOf {}
|
||||
#[cfg(target_os = "unknown")]
|
||||
pub trait MallocSizeOfWasm {}
|
||||
#[cfg(not(target_os = "unknown"))]
|
||||
impl<T: MallocSizeOf> MallocSizeOfWasm for T {}
|
||||
#[cfg(target_os = "unknown")]
|
||||
impl<T> MallocSizeOfWasm for T {}
|
||||
|
||||
/// RPC handlers that can perform RPC queries.
|
||||
#[derive(Clone)]
|
||||
pub struct RpcHandlers(
|
||||
@@ -305,7 +294,6 @@ async fn build_network_future<
|
||||
}
|
||||
|
||||
// Wrapper for HTTP and WS servers that makes sure they are properly shut down.
|
||||
#[cfg(not(target_os = "unknown"))]
|
||||
mod waiting {
|
||||
pub struct HttpServer(pub Option<sc_rpc_server::HttpServer>);
|
||||
impl Drop for HttpServer {
|
||||
@@ -340,7 +328,6 @@ mod waiting {
|
||||
|
||||
/// Starts RPC servers that run in their own thread, and returns an opaque object that keeps them
|
||||
/// alive.
|
||||
#[cfg(not(target_os = "unknown"))]
|
||||
fn start_rpc_servers<
|
||||
H: FnMut(
|
||||
sc_rpc::DenyUnsafe,
|
||||
@@ -445,23 +432,6 @@ fn start_rpc_servers<
|
||||
)))
|
||||
}
|
||||
|
||||
/// Starts RPC servers that run in their own thread, and returns an opaque object that keeps them
|
||||
/// alive.
|
||||
#[cfg(target_os = "unknown")]
|
||||
fn start_rpc_servers<
|
||||
H: FnMut(
|
||||
sc_rpc::DenyUnsafe,
|
||||
sc_rpc_server::RpcMiddleware,
|
||||
) -> Result<sc_rpc_server::RpcHandler<sc_rpc::Metadata>, Error>,
|
||||
>(
|
||||
_: &Configuration,
|
||||
_: H,
|
||||
_: Option<sc_rpc_server::RpcMetrics>,
|
||||
_: sc_rpc_server::ServerMetrics,
|
||||
) -> Result<Box<dyn std::any::Any + Send + Sync>, error::Error> {
|
||||
Ok(Box::new(()))
|
||||
}
|
||||
|
||||
/// An RPC session. Used to perform in-memory RPC queries (ie. RPC queries that don't go through
|
||||
/// the HTTP or WebSockets server).
|
||||
#[derive(Clone)]
|
||||
|
||||
Reference in New Issue
Block a user