Skip to content

Commit 16b4ade

Browse files
committed
chore(volo-grpc): update version and cargo clippy
1 parent c86c8ff commit 16b4ade

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

volo-grpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "volo-grpc"
3-
version = "0.11.7"
3+
version = "0.11.8"
44
edition.workspace = true
55
homepage.workspace = true
66
repository.workspace = true

volo-grpc/src/codec/compression.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use flate2::bufread::{GzDecoder, GzEncoder};
1212
#[cfg(feature = "zlib")]
1313
use flate2::bufread::{ZlibDecoder, ZlibEncoder};
1414
use http::HeaderValue;
15-
use pilota::LinkedBytes;
1615

1716
use super::BUFFER_SIZE;
1817
#[cfg(feature = "compress")]
@@ -349,8 +348,7 @@ pub(crate) fn decompress(
349348

350349
#[cfg(test)]
351350
mod tests {
352-
use bytes::{BufMut, BytesMut};
353-
use pilota::LinkedBytes;
351+
use bytes::BytesMut;
354352

355353
#[cfg(feature = "gzip")]
356354
use crate::codec::compression::GzipConfig;

volo-grpc/src/codec/encode.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,14 @@ where
9393

9494
pub mod tests {
9595

96-
use super::*;
97-
9896
#[derive(Debug, Default, Clone, PartialEq)]
9997
pub struct EchoRequest {
10098
pub message: ::pilota::FastStr,
10199
}
102100
impl ::pilota::pb::Message for EchoRequest {
103101
#[inline]
104102
fn encoded_len(&self) -> usize {
105-
0 + ::pilota::pb::encoding::faststr::encoded_len(1, &self.message)
103+
::pilota::pb::encoding::faststr::encoded_len(1, &self.message)
106104
}
107105

108106
#[allow(unused_variables)]
@@ -118,7 +116,7 @@ pub mod tests {
118116
buf: &mut ::pilota::Bytes,
119117
ctx: &mut ::pilota::pb::encoding::DecodeContext,
120118
) -> ::core::result::Result<(), ::pilota::pb::DecodeError> {
121-
const STRUCT_NAME: &'static str = stringify!(EchoRequest);
119+
const STRUCT_NAME: &str = stringify!(EchoRequest);
122120

123121
match tag {
124122
1 => {
@@ -136,6 +134,7 @@ pub mod tests {
136134

137135
#[tokio::test]
138136
async fn test_encode() {
137+
use super::*;
139138
let source = async_stream::stream! {
140139
yield Ok(EchoRequest { message: "Volo".into() });
141140
};
@@ -156,6 +155,7 @@ pub mod tests {
156155
async fn test_encode_gzip() {
157156
use bytes::BytesMut;
158157

158+
use super::*;
159159
use crate::codec::compression::{GzipConfig, decompress};
160160

161161
let source = async_stream::stream! {
@@ -189,6 +189,7 @@ pub mod tests {
189189
async fn test_encode_zlib() {
190190
use bytes::BytesMut;
191191

192+
use super::*;
192193
use crate::codec::compression::{ZlibConfig, decompress};
193194

194195
let source = async_stream::stream! {
@@ -222,6 +223,7 @@ pub mod tests {
222223
async fn test_encode_zstd() {
223224
use bytes::BytesMut;
224225

226+
use super::*;
225227
use crate::codec::compression::{ZstdConfig, decompress};
226228

227229
let source = async_stream::stream! {

0 commit comments

Comments
 (0)