Skip to content

Commit

Permalink
fix all clippy 1.78 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed May 10, 2024
1 parent ce63c31 commit 11aa3fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions g3proxy/src/escape/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ pub(crate) trait EscaperInternal {
#[async_trait]
pub(crate) trait Escaper: EscaperInternal {
fn name(&self) -> &MetricsName;
#[allow(unused)]
fn escaper_type(&self) -> &str;
fn get_escape_stats(&self) -> Option<ArcEscaperStats> {
None
Expand Down
7 changes: 5 additions & 2 deletions g3proxy/src/serve/http_proxy/task/ftp/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

use std::io::{self, Error, Write};
use std::io::{self, Write};

use tokio::io::{AsyncWrite, AsyncWriteExt, BufWriter};

Expand All @@ -26,8 +26,11 @@ const CHUNKED_BUF_TAIL_RESERVED: usize = 2;
pub(super) trait ListWriter: FtpLineDataReceiver {
fn take_io_error(&mut self) -> Option<io::Error>;
async fn flush_buf(&mut self) -> io::Result<()>;
#[allow(unused)]
fn is_idle(&self) -> bool;
#[allow(unused)]
fn reset_active(&mut self);
#[allow(unused)]
fn no_cached_data(&self) -> bool;
}

Expand Down Expand Up @@ -102,7 +105,7 @@ where
W: AsyncWrite + Send + Unpin,
{
#[inline]
fn take_io_error(&mut self) -> Option<Error> {
fn take_io_error(&mut self) -> Option<io::Error> {
self.io_error.take()
}

Expand Down
1 change: 1 addition & 0 deletions g3tiles/src/config/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub(crate) enum BackendConfigDiffAction {
pub(crate) trait BackendConfig {
fn name(&self) -> &MetricsName;
fn position(&self) -> Option<YamlDocPosition>;
#[allow(unused)]
fn backend_type(&self) -> &'static str;

fn diff_action(&self, new: &AnyBackendConfig) -> BackendConfigDiffAction;
Expand Down
1 change: 1 addition & 0 deletions g3tiles/src/config/discover/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub(crate) enum DiscoverConfigDiffAction {
pub(crate) trait DiscoverConfig {
fn name(&self) -> &MetricsName;
fn position(&self) -> Option<YamlDocPosition>;
#[allow(unused)]
fn discover_type(&self) -> &'static str;

fn diff_action(&self, new: &AnyDiscoverConfig) -> DiscoverConfigDiffAction;
Expand Down

0 comments on commit 11aa3fc

Please sign in to comment.