Fix some clippy lints (#292)

This commit can be replicated with `cargo +nightly clippy --fix -Z unstable-options`,
plus an edit to fix another `return` missed by clippy.
This commit is contained in:
Joshua Nelson
2021-01-03 23:10:43 -05:00
committed by GitHub
parent 6126a2fe50
commit f0245aad23
7 changed files with 15 additions and 15 deletions

View File

@@ -279,19 +279,19 @@ pub fn is_test(is: bool) -> bool {
IS_TEST.store(true, Ordering::SeqCst);
}
let x = IS_TEST.load(Ordering::SeqCst);
return x;
x
}
/// Agents are used to hold configuration and keep state between requests.
pub fn agent() -> Agent {
#[cfg(not(test))]
if is_test(false) {
return testserver::test_agent();
testserver::test_agent()
} else {
return AgentBuilder::new().build();
AgentBuilder::new().build()
}
#[cfg(test)]
return testserver::test_agent();
testserver::test_agent()
}
/// Make a request with the HTTP verb as a parameter.