This commit is contained in:
veeso
2023-02-11 12:23:56 +01:00
parent 62003308a7
commit 4d5f3a6b63
40 changed files with 139 additions and 147 deletions
+1 -1
View File
@@ -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());
}
}
}
+3 -3
View File
@@ -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}"))
}
}
}
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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!(
"{}://{}{}:{}",