Skip to content

Commit 5ce81df

Browse files
committed
Auto merge of #1932 - jtgeibel:clippy-cleanups, r=carols10cents
Add `-D warnings` to `RUSTFLAGS` on CI By denying warnings explicitly on CI, we don't need to deny warnings in each library or binary. `#![warn(clippy::all)]` is used to automatically enable clippy in RLS enabled IDEs and `rust_2018_idioms` is now applied consistently. Finally, clippy allow attributes that are no longer needed have been removed.
2 parents 05b1399 + d2ed9de commit 5ce81df

16 files changed

+15
-25
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
- PERCY_PROJECT=crates-io/crates.io
2222
- PGPORT=5433
2323
- PATH=$HOME/.cargo/bin:$PATH
24-
- RUSTFLAGS="-C debuginfo=0"
24+
- RUSTFLAGS="-C debuginfo=0 -D warnings"
2525

2626
install:
2727
- sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf

src/bin/background-worker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//! Usage:
1111
//! cargo run --bin background-worker
1212
13-
#![deny(warnings, clippy::all, rust_2018_idioms)]
13+
#![warn(clippy::all, rust_2018_idioms)]
1414

1515
use cargo_registry::git::{Repository, RepositoryConfig};
1616
use cargo_registry::{background_jobs::*, db};

src/bin/delete-crate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Usage:
66
// cargo run --bin delete-crate crate-name
77

8-
#![deny(warnings, clippy::all, rust_2018_idioms)]
8+
#![warn(clippy::all, rust_2018_idioms)]
99

1010
use cargo_registry::{db, models::Crate, schema::crates};
1111
use std::{

src/bin/delete-version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Usage:
66
// cargo run --bin delete-version crate-name version-number
77

8-
#![deny(warnings, clippy::all, rust_2018_idioms)]
8+
#![warn(clippy::all, rust_2018_idioms)]
99

1010
use cargo_registry::{
1111
db,

src/bin/monitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! Usage:
55
//! cargo run --bin monitor
66
7-
#![deny(warnings, clippy::all, rust_2018_idioms)]
7+
#![warn(clippy::all, rust_2018_idioms)]
88

99
mod on_call;
1010

src/bin/populate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Usage:
55
// cargo run --bin populate version_id1 version_id2 ...
66

7-
#![deny(warnings, clippy::all, rust_2018_idioms)]
7+
#![warn(clippy::all, rust_2018_idioms)]
88

99
use cargo_registry::{db, schema::version_downloads};
1010
use std::env;

src/bin/render-readmes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// Warning: this can take a lot of time.
55

6-
#![deny(warnings, clippy::all, rust_2018_idioms)]
6+
#![warn(clippy::all, rust_2018_idioms)]
77

88
#[macro_use]
99
extern crate serde;

src/bin/server.rs

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

33
use cargo_registry::{boot, App, Env};
44
use std::{

src/bin/test-pagerduty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//!
66
//! Event type can be trigger, acknowledge, or resolve
77
8-
#![deny(warnings, clippy::all, rust_2018_idioms)]
8+
#![warn(clippy::all, rust_2018_idioms)]
99

1010
mod on_call;
1111

src/bin/transfer-crates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Usage:
44
// cargo run --bin transfer-crates from-user to-user
55

6-
#![deny(warnings, clippy::all, rust_2018_idioms)]
6+
#![warn(clippy::all, rust_2018_idioms)]
77

88
use cargo_registry::{
99
db,

0 commit comments

Comments
 (0)