mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
Further expand clippy workspace lints
Achieves a notable amount of reduced async and clones.
This commit is contained in:
@@ -63,7 +63,7 @@ impl Client {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn without_connection_pool(host: String) -> Result<Client, Error> {
|
||||
pub fn without_connection_pool(host: &str) -> Result<Client, Error> {
|
||||
Ok(Client {
|
||||
connection: Connection::Connection {
|
||||
connector: Self::connector(),
|
||||
|
||||
@@ -18,7 +18,7 @@ impl Request {
|
||||
|
||||
let mut userpass_iter = userpass.split(':');
|
||||
let username = userpass_iter.next().unwrap().to_string();
|
||||
let password = userpass_iter.next().map(str::to_string).unwrap_or_else(String::new);
|
||||
let password = userpass_iter.next().map_or_else(String::new, str::to_string);
|
||||
zeroize::Zeroize::zeroize(&mut userpass);
|
||||
|
||||
return Ok((username, password));
|
||||
|
||||
Reference in New Issue
Block a user