Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put deny(warnings) behind a feature gate, which is enabled by default. #331

Merged
merged 1 commit into from
Nov 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions neqo-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ neqo-common = { version="0.1", path="./../neqo-common" }
neqo-http3 = { version = "0.1", path = "./../neqo-http3" }
structopt = "0.2.15"
url = "1.7.2"

[features]
default = ["deny-warnings"]
deny-warnings = []
2 changes: 1 addition & 1 deletion neqo-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
use neqo_common::{matches, Datagram};
use neqo_crypto::{init, AuthenticationStatus};
use neqo_http3::{Header, Http3Client, Http3ClientEvent, Http3State, Output};
Expand Down
4 changes: 4 additions & 0 deletions neqo-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ num-traits = "0.2"
log = "0.4.0"
env_logger = "0.6.1"
lazy_static = "1.3.0"

[features]
default = ["deny-warnings"]
deny-warnings = []
2 changes: 1 addition & 1 deletion neqo-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

mod codec;
mod datagram;
Expand Down
2 changes: 1 addition & 1 deletion neqo-common/tests/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_common::{qdebug, qerror, qinfo, qtrace, qwarn};

Expand Down
2 changes: 2 additions & 0 deletions neqo-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ toml = "0.4"
test-fixture = { path = "../test-fixture" }

[features]
default = ["deny-warnings"]
deny-warnings = []
gecko = []
2 changes: 1 addition & 1 deletion neqo-crypto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use bindgen::Builder;
use serde_derive::Deserialize;
Expand Down
2 changes: 1 addition & 1 deletion neqo-crypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
// Bindgen auto generated code
// won't adhere to the clippy rules below
#![allow(clippy::module_name_repetitions)]
Expand Down
2 changes: 1 addition & 1 deletion neqo-crypto/tests/aead.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_crypto::aead::Aead;
use neqo_crypto::constants::*;
Expand Down
2 changes: 1 addition & 1 deletion neqo-crypto/tests/agent.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_crypto::*;

Expand Down
2 changes: 1 addition & 1 deletion neqo-crypto/tests/ext.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_crypto::*;
use std::cell::RefCell;
Expand Down
2 changes: 1 addition & 1 deletion neqo-crypto/tests/hkdf.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_crypto::constants::*;
use neqo_crypto::{hkdf, SymKey};
Expand Down
2 changes: 1 addition & 1 deletion neqo-crypto/tests/hp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_crypto::constants::*;
use neqo_crypto::hkdf;
Expand Down
2 changes: 1 addition & 1 deletion neqo-crypto/tests/init.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

// This uses external interfaces to neqo_crypto rather than being a module
// inside of lib.rs. Because all other code uses the test_fixture module,
Expand Down
2 changes: 1 addition & 1 deletion neqo-crypto/tests/selfencrypt.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_crypto::constants::*;
use neqo_crypto::{init, selfencrypt::SelfEncrypt, Error};
Expand Down
4 changes: 4 additions & 0 deletions neqo-http3-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ structopt = "0.2.15"
mio = "0.6.17"
mio-extras = "2.0.5"
log = "0.4.0"

[features]
default = ["deny-warnings"]
deny-warnings = []
2 changes: 1 addition & 1 deletion neqo-http3-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_common::{qdebug, qinfo, Datagram};
use neqo_crypto::{init_db, AntiReplay};
Expand Down
4 changes: 4 additions & 0 deletions neqo-http3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ smallvec = "1.0.0"

[dev-dependencies]
test-fixture = { path = "../test-fixture" }

[features]
default = ["deny-warnings"]
deny-warnings = []
2 changes: 1 addition & 1 deletion neqo-http3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

mod client_events;
mod connection;
Expand Down
4 changes: 4 additions & 0 deletions neqo-interop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ neqo-common = { version="0.1", path="./../neqo-common" }
neqo-http3 = { version = "0.1", path = "./../neqo-http3" }

structopt = "0.2.15"

[features]
default = ["deny-warnings"]
deny-warnings = []
2 changes: 1 addition & 1 deletion neqo-interop/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_common::{matches, Datagram};
use neqo_crypto::{init, AuthenticationStatus};
Expand Down
4 changes: 4 additions & 0 deletions neqo-qpack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ log = "0.4.0"

[dev-dependencies]
test-fixture = { path = "../test-fixture" }

[features]
default = ["deny-warnings"]
deny-warnings = []
2 changes: 1 addition & 1 deletion neqo-qpack/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

pub mod decoder;
pub mod encoder;
Expand Down
4 changes: 4 additions & 0 deletions neqo-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ neqo-transport = { path = "./../neqo-transport" }
neqo-common = { path="./../neqo-common" }
structopt = "0.2.15"
regex = "1"

[features]
default = ["deny-warnings"]
deny-warnings = []
2 changes: 1 addition & 1 deletion neqo-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_common::Datagram;
use neqo_crypto::{init_db, AntiReplay};
Expand Down
4 changes: 4 additions & 0 deletions neqo-transport/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ smallvec = "1.0.0"

[dev-dependencies]
test-fixture = { path = "../test-fixture" }

[features]
default = ["deny-warnings"]
deny-warnings = []
2 changes: 1 addition & 1 deletion neqo-transport/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_common::qinfo;
use neqo_crypto;
Expand Down
2 changes: 1 addition & 1 deletion neqo-transport/tests/conn_vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// except according to those terms.

// Tests with the test vectors from the spec.
#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
use neqo_common::{Datagram, Encoder};
use neqo_transport::State;
use test_fixture::*;
Expand Down
2 changes: 1 addition & 1 deletion neqo-transport/tests/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_common::Datagram;
use neqo_transport::State;
Expand Down
2 changes: 1 addition & 1 deletion neqo-transport/tests/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_common::{hex, qdebug, qtrace, Datagram, Decoder, Encoder};
use neqo_crypto::{
Expand Down
4 changes: 4 additions & 0 deletions test-fixture/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ neqo-crypto = { path = "../neqo-crypto" }
neqo-http3 = { path = "../neqo-http3" }
neqo-transport = { path = "../neqo-transport" }
log = "0.4.0"

[features]
default = ["deny-warnings"]
deny-warnings = []
2 changes: 1 addition & 1 deletion test-fixture/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]

use neqo_common::matches;
use neqo_common::once::OnceResult;
Expand Down