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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user