mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 02:19:22 +02:00
clippy
This commit is contained in:
@ -89,7 +89,7 @@ impl From<Error> for io::Error {
|
||||
fn from(err: Error) -> Self {
|
||||
match err {
|
||||
Error::EnvVarError(var_error) => {
|
||||
let msg = format!("Env var error: {}", var_error);
|
||||
let msg = format!("Env var error: {var_error}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
|
||||
@ -105,32 +105,29 @@ impl From<Error> for io::Error {
|
||||
line,
|
||||
column,
|
||||
} => {
|
||||
let msg = format!(
|
||||
"Expected {}, got {} (@ {}:{}:{})",
|
||||
expected, got, file, line, column
|
||||
);
|
||||
let msg = format!("Expected {expected}, got {got} (@ {file}:{line}:{column})");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
|
||||
Error::IoError(io_error) => io_error.into(),
|
||||
|
||||
Error::ParseBoolError(parse_bool_error) => {
|
||||
let msg = format!("Failed to parse boolean: {}", parse_bool_error);
|
||||
let msg = format!("Failed to parse boolean: {parse_bool_error}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
|
||||
Error::ParseIntError(parse_int_error) => {
|
||||
let msg = format!("Failed to parse integer: {}", parse_int_error);
|
||||
let msg = format!("Failed to parse integer: {parse_int_error}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
|
||||
Error::ParseAddressError(string) => {
|
||||
let msg = format!("Failed to parse address: {}", string);
|
||||
let msg = format!("Failed to parse address: {string}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
|
||||
Error::TomlError(toml_error) => {
|
||||
let msg = format!("TOML error: {}", toml_error);
|
||||
let msg = format!("TOML error: {toml_error}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ where
|
||||
todo!("[ApplySettings] TLS support has not been implemented yet.");
|
||||
} else {
|
||||
for Address { host, port } in &settings.actix.hosts {
|
||||
self = self.bind(format!("{}:{}", host, port))
|
||||
self = self.bind(format!("{host}:{port}"))
|
||||
.unwrap(/*TODO*/);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user