mirror of
https://github.com/veeso/termscp.git
synced 2026-09-27 06:21:22 -07:00
lint
This commit is contained in:
@@ -102,7 +102,7 @@ impl AuthActivity {
|
||||
fn write_bookmarks(&mut self) {
|
||||
if let Some(bookmarks_cli) = self.bookmarks_client() {
|
||||
if let Err(err) = bookmarks_cli.write_bookmarks() {
|
||||
self.mount_error(format!("Could not write bookmarks: {}", err).as_str());
|
||||
self.mount_error(format!("Could not write bookmarks: {err}").as_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ impl AuthActivity {
|
||||
// Report error
|
||||
error!("Failed to get latest version: {}", err);
|
||||
self.mount_error(
|
||||
format!("Could not check for new updates: {}", err).as_str(),
|
||||
format!("Could not check for new updates: {err}").as_str(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -136,13 +136,13 @@ impl AuthActivity {
|
||||
if self.config().get_notifications() {
|
||||
Notification::update_installed(ver.as_str());
|
||||
}
|
||||
self.mount_info(format!("termscp has been updated to version {}!", ver))
|
||||
self.mount_info(format!("termscp has been updated to version {ver}!"))
|
||||
}
|
||||
Err(err) => {
|
||||
if self.config().get_notifications() {
|
||||
Notification::update_failed(err.to_string());
|
||||
}
|
||||
self.mount_error(format!("Could not install update: {}", err))
|
||||
self.mount_error(format!("Could not install update: {err}"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ impl Activity for AuthActivity {
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
self.mount_error(format!("Application error: {}", err));
|
||||
self.mount_error(format!("Application error: {err}"));
|
||||
}
|
||||
}
|
||||
// View
|
||||
|
||||
@@ -881,7 +881,7 @@ impl AuthActivity {
|
||||
/// Format bookmark to display on ui
|
||||
fn fmt_bookmark(name: &str, b: FileTransferParams) -> String {
|
||||
let addr: String = Self::fmt_recent(b);
|
||||
format!("{} ({})", name, addr)
|
||||
format!("{name} ({addr})")
|
||||
}
|
||||
|
||||
/// Format recent connection to display on ui
|
||||
@@ -890,7 +890,7 @@ impl AuthActivity {
|
||||
match b.params {
|
||||
ProtocolParams::AwsS3(s3) => {
|
||||
let profile: String = match s3.profile {
|
||||
Some(p) => format!("[{}]", p),
|
||||
Some(p) => format!("[{p}]"),
|
||||
None => String::default(),
|
||||
};
|
||||
format!(
|
||||
@@ -905,7 +905,7 @@ impl AuthActivity {
|
||||
ProtocolParams::Generic(params) => {
|
||||
let username: String = match params.username {
|
||||
None => String::default(),
|
||||
Some(u) => format!("{}@", u),
|
||||
Some(u) => format!("{u}@"),
|
||||
};
|
||||
format!(
|
||||
"{}://{}{}:{}",
|
||||
|
||||
Reference in New Issue
Block a user