Suppress unused warnings and clean up workspace
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// @generated by protoc-gen-roto — do not edit
|
||||
#[allow(unused_imports)]
|
||||
#[allow(unused)]
|
||||
|
||||
use roto_runtime::{ProtoAccessor, ProtoBuilder, Result, RotoError, read_varint, RepeatedFieldIterator, RotoMessage};
|
||||
use std::str;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @generated by protoc-gen-roto — do not edit
|
||||
#[allow(unused_imports)]
|
||||
#![allow(unused)]
|
||||
use roto_runtime::{ProtoAccessor, ProtoBuilder, Result, RotoError, read_varint, RepeatedFieldIterator, RotoMessage};
|
||||
use core::str;
|
||||
use bytes::{Bytes, BytesMut, Buf, BufMut};
|
||||
|
||||
+12
-9
@@ -1,12 +1,11 @@
|
||||
use std::marker::PhantomData;
|
||||
use tonic::codec::{Codec, Decoder, Encoder, DecodeBuf, EncodeBuf};
|
||||
use bytes::{Buf, BufMut, Bytes, BytesMut};
|
||||
use roto_runtime::RotoMessage;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::pin::Pin;
|
||||
use std::future::Future;
|
||||
use std::task::{Context, Poll};
|
||||
use http_body::Body;
|
||||
use roto_runtime::RotoMessage;
|
||||
use std::marker::PhantomData;
|
||||
use std::pin::Pin;
|
||||
use std::sync::Mutex;
|
||||
use std::task::{Context, Poll};
|
||||
use tonic::codec::{Codec, DecodeBuf, Decoder, EncodeBuf, Encoder};
|
||||
|
||||
pub mod generated {
|
||||
pub mod helloworld;
|
||||
@@ -95,7 +94,11 @@ impl BufferPool {
|
||||
}
|
||||
|
||||
pub fn get(&self) -> BytesMut {
|
||||
self.pool.lock().unwrap().pop().unwrap_or_else(|| BytesMut::with_capacity(self.default_capacity))
|
||||
self.pool
|
||||
.lock()
|
||||
.unwrap()
|
||||
.pop()
|
||||
.unwrap_or_else(|| BytesMut::with_capacity(self.default_capacity))
|
||||
}
|
||||
|
||||
pub fn put(&self, mut buf: BytesMut) {
|
||||
@@ -128,7 +131,7 @@ impl Body for StatusBody {
|
||||
|
||||
fn poll_frame(
|
||||
mut self: Pin<&mut Self>,
|
||||
cx: &mut Context<'_>,
|
||||
_cx: &mut Context<'_>,
|
||||
) -> Poll<Option<Result<http_body::Frame<Self::Data>, Self::Error>>> {
|
||||
if let Some(data) = self.data.take() {
|
||||
Poll::Ready(Some(Ok(http_body::Frame::data(data))))
|
||||
|
||||
Reference in New Issue
Block a user