Skip to content

Commit 0f6de99

Browse files
committed
lint
1 parent 0d8cb2d commit 0f6de99

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

apollo-router/src/axum_factory/axum_http_server_factory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ async fn handle_graphql(
469469
tracing::info!(counter.apollo_router_session_count_active = -1,);
470470
let (mut parts, body) = response.response.into_parts();
471471

472-
println!("will compress response, accept-encoding == {accept_encoding:?}");
472+
//println!("will compress response, accept-encoding == {accept_encoding:?}");
473473

474474
let opt_compressor = accept_encoding
475475
.as_ref()

apollo-router/src/axum_factory/compression/codec/brotli/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl BrotliEncoder {
3333
op: BrotliEncoderOperation,
3434
) -> Result<()> {
3535
let in_buf = input.unwritten();
36-
let mut out_buf = output.unwritten_mut();
36+
let out_buf = output.unwritten_mut();
3737

3838
let mut input_len = 0;
3939
let mut output_len = 0;

apollo-router/src/axum_factory/compression/codec/gzip/header.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(dead_code)]
12
// All code from this module is extracted from https://github.com/Nemo157/async-compression and is under MIT or Apache-2 licence
23
// it will be removed when we find a long lasting solution to https://github.com/Nemo157/async-compression/issues/154
34
use crate::axum_factory::compression::util::PartialBuffer;

apollo-router/src/axum_factory/compression/codec/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ mod brotli;
77
mod deflate;
88
mod flate;
99
mod gzip;
10-
mod zlib;
10+
//mod zlib;
1111
mod zstd;
1212

1313
pub(crate) use self::brotli::BrotliEncoder;
1414
pub(crate) use self::deflate::DeflateEncoder;
1515
pub(crate) use self::flate::FlateEncoder;
1616
pub(crate) use self::gzip::GzipEncoder;
17-
pub(crate) use self::zlib::ZlibEncoder;
17+
//pub(crate) use self::zlib::ZlibEncoder;
1818
pub(crate) use self::zstd::ZstdEncoder;
1919

2020
pub(crate) trait Encode {

apollo-router/src/axum_factory/compression/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ where {
8080
Ok(()) => {}
8181
}
8282

83-
let read = partial_input.written().len();
83+
//let read = partial_input.written().len();
8484
written += partial_output.written().len();
85-
println!("encode: read from input: {read}, written = {written}");
85+
//println!("encode: read from input: {read}, written = {written}");
8686

8787
if !partial_input.unwritten().is_empty() {
8888
// there was not enough space in the output buffer to compress everything,
@@ -97,7 +97,7 @@ where {
9797
Err(e) => panic!("{e:?}"),
9898
Ok(_) => {
9999
let flushed = partial_output.written().len() - written;
100-
println!("flush with buffer of size {flushed}");
100+
//println!("flush with buffer of size {flushed}");
101101
let _ = partial_output.into_inner();
102102
buf.resize(flushed, 0);
103103
if let Err(_) = tx.send(Ok(buf.freeze())).await {
@@ -119,7 +119,7 @@ where {
119119
Err(e) => panic!("{e:?}"),
120120
Ok(_) => {
121121
let len = partial_output.written().len();
122-
println!("finish with buffer of size {}", len);
122+
//println!("finish with buffer of size {}", len);
123123

124124
let mut buf = partial_output.into_inner();
125125
buf.resize(len, 0);
@@ -128,7 +128,6 @@ where {
128128
}
129129
}
130130
}
131-
//tx.send(partial_output.into_inner().freeze());
132131
});
133132
ReceiverStream::new(rx)
134133
}

apollo-router/src/axum_factory/compression/util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(dead_code)]
12
// All code from this module is extracted from https://github.com/Nemo157/async-compression and is under MIT or Apache-2 licence
23
// it will be removed when we find a long lasting solution to https://github.com/Nemo157/async-compression/issues/154
34
pub(crate) fn _assert_send<T: Send>() {}

0 commit comments

Comments
 (0)