mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-17 10:05:41 +00:00
Move non runtime related stuff into node/primitives (#2743)
* Remove stuff out of the runtime that does not belong there. There might be more, but it is a start. * White space fixes. * Fix tests. * Leave whitespace in ui tests alone. * Add back zstd for no reason. * Fix browser wasm (hopefully)
This commit is contained in:
@@ -91,9 +91,9 @@ impl<T> MeteredReceiver<T> {
|
||||
}
|
||||
|
||||
impl<T> futures::stream::FusedStream for MeteredReceiver<T> {
|
||||
fn is_terminated(&self) -> bool {
|
||||
self.inner.is_terminated()
|
||||
}
|
||||
fn is_terminated(&self) -> bool {
|
||||
self.inner.is_terminated()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -155,32 +155,32 @@ impl<T> MeteredSender<T> {
|
||||
}
|
||||
|
||||
impl<T> futures::sink::Sink<T> for MeteredSender<T> {
|
||||
type Error = mpsc::SendError;
|
||||
type Error = mpsc::SendError;
|
||||
|
||||
fn start_send(mut self: Pin<&mut Self>, item: T) -> Result<(), Self::Error> {
|
||||
Pin::new(&mut self.inner).start_send(item)
|
||||
}
|
||||
fn start_send(mut self: Pin<&mut Self>, item: T) -> Result<(), Self::Error> {
|
||||
Pin::new(&mut self.inner).start_send(item)
|
||||
}
|
||||
|
||||
fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||
Pin::new(&mut self.inner).poll_ready(cx)
|
||||
}
|
||||
fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||
Pin::new(&mut self.inner).poll_ready(cx)
|
||||
}
|
||||
|
||||
fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||
match Pin::new(&mut self.inner).poll_close(cx) {
|
||||
val @ Poll::Ready(_)=> {
|
||||
val
|
||||
}
|
||||
other => other,
|
||||
}
|
||||
}
|
||||
fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||
match Pin::new(&mut self.inner).poll_close(cx) {
|
||||
val @ Poll::Ready(_)=> {
|
||||
val
|
||||
}
|
||||
other => other,
|
||||
}
|
||||
}
|
||||
|
||||
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||
match Pin::new(&mut self.inner).poll_flush(cx) {
|
||||
val @ Poll::Ready(_)=> {
|
||||
self.meter.note_sent();
|
||||
val
|
||||
}
|
||||
other => other,
|
||||
}
|
||||
}
|
||||
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||
match Pin::new(&mut self.inner).poll_flush(cx) {
|
||||
val @ Poll::Ready(_)=> {
|
||||
self.meter.note_sent();
|
||||
val
|
||||
}
|
||||
other => other,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user