Skip to content

Commit 1168fd7

Browse files
committed
Auto merge of #3717 - jtgeibel:cleanup-lints, r=Turbo87
Cleanup unneeded lints and drop unused Debug impls The lib crate is only used by other in-tree crates. Therefore if Debug or Copy impls are ever needed, they can be easily added. 82 unused Debug impls are then dropped. This probably has a slight but negligible improvement to compile/link times. r? `@Turbo87`
2 parents 6ed5047 + a891c24 commit 1168fd7

File tree

14 files changed

+1
-23
lines changed

14 files changed

+1
-23
lines changed

src/app.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ use scheduled_thread_pool::ScheduledThreadPool;
1515

1616
/// The `App` struct holds the main components of the application like
1717
/// the database connection pool and configurations
18-
// The db, oauth, and git2 types don't implement debug.
19-
#[allow(missing_debug_implementations)]
2018
pub struct App {
2119
/// The primary database connection pool
2220
pub primary_database: DieselPool,

src/background_jobs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ impl swirl::db::DieselPool for DieselPool {
2020
}
2121
}
2222

23-
#[allow(missing_debug_implementations)]
2423
pub struct Environment {
2524
index: Arc<Mutex<Repository>>,
2625
pub uploader: Uploader,

src/bin/enqueue-job.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![deny(clippy::all)]
1+
#![warn(clippy::all, rust_2018_idioms)]
22

33
use anyhow::{anyhow, Result};
44
use cargo_registry::{db, env, tasks};

src/bin/server.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![warn(clippy::all, rust_2018_idioms)]
2-
#![allow(unknown_lints)]
32

43
use cargo_registry::{metrics::LogEncoder, util::errors::AppResult, App, Env};
54
use std::{borrow::Cow, fs::File, process::Command, sync::Arc, time::Duration};

src/db.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use url::Url;
88

99
use crate::middleware::app::RequestApp;
1010

11-
#[allow(missing_debug_implementations)]
1211
#[derive(Clone)]
1312
pub enum DieselPool {
1413
Pool(r2d2::Pool<ConnectionManager<PgConnection>>),
@@ -104,7 +103,6 @@ pub struct PoolState {
104103
pub idle_connections: u32,
105104
}
106105

107-
#[allow(missing_debug_implementations)]
108106
pub enum DieselPooledConn<'a> {
109107
Pool(r2d2::PooledConnection<ConnectionManager<PgConnection>>),
110108
Test(ReentrantMutexGuard<'a, PgConnection>),

src/git.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(missing_debug_implementations)]
2-
31
use std::collections::HashMap;
42
use std::fs::{self, OpenOptions};
53
use std::path::{Path, PathBuf};

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
//! [krate](krate/index.html), [user](user/index.html) and [version](version/index.html) modules.
66
77
#![warn(clippy::all, rust_2018_idioms)]
8-
#![warn(missing_debug_implementations, missing_copy_implementations)]
98

109
#[cfg(test)]
1110
#[macro_use]

src/middleware/app.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ use crate::App;
44
use std::sync::Arc;
55

66
/// Middleware that injects the `App` instance into the `Request` extensions
7-
// Can't derive Debug because `App` can't.
8-
#[allow(missing_debug_implementations)]
97
pub struct AppMiddleware {
108
app: Arc<App>,
119
}

src/middleware/block_traffic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ use super::prelude::*;
1212
use crate::App;
1313
use std::sync::Arc;
1414

15-
// Can't derive debug because of Handler.
16-
#[allow(missing_debug_implementations)]
1715
#[derive(Default)]
1816
pub struct BlockTraffic {
1917
header_name: String,

src/middleware/head.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ use super::prelude::*;
55
use crate::util::RequestProxy;
66
use conduit::Method;
77

8-
// Can't derive debug because of Handler.
9-
#[allow(missing_debug_implementations)]
108
#[derive(Default)]
119
pub struct Head {
1210
handler: Option<Box<dyn Handler>>,

0 commit comments

Comments
 (0)