CI: error on dead/unused code for features (#146)

By using `RUSTFLAGS="-D dead_code -D unused-variables -D unused"`, we tell
the compiler to upgrade warnings for unused code to errors. This combined
with a more elaborate test matrix means we can have the CI catch feature
flag combos that cause warnings.
This commit is contained in:
Martin Algesten
2020-09-18 22:55:23 +02:00
committed by GitHub
parent f599828c6d
commit 05ffe53e4c
3 changed files with 35 additions and 9 deletions

View File

@@ -282,7 +282,6 @@ pub(crate) fn basic_auth(user: &str, pass: &str) -> String {
#[cfg(test)]
mod tests {
use super::*;
use std::io::Read;
use std::thread;
///////////////////// AGENT TESTS //////////////////////////////
@@ -298,6 +297,8 @@ mod tests {
#[test]
#[cfg(any(feature = "tls", feature = "native-tls"))]
fn agent_pool() {
use std::io::Read;
let agent = crate::agent();
let url = "https://ureq.s3.eu-central-1.amazonaws.com/sherlock.txt";
// req 1