feat: **Updated dependencies** and updated the Rust edition to 2024

This commit is contained in:
veeso
2025-06-08 18:00:42 +02:00
parent 8715c2b6f9
commit 783da22ca2
39 changed files with 715 additions and 639 deletions
@@ -197,7 +197,7 @@ impl DeleteBookmarkPopup {
.color(color)
.modifiers(BorderType::Rounded),
)
.choices(&["Yes", "No"])
.choices(["Yes", "No"])
.value(1)
.rewind(true)
.foreground(color)
@@ -265,7 +265,7 @@ impl DeleteRecentPopup {
.color(color)
.modifiers(BorderType::Rounded),
)
.choices(&["Yes", "No"])
.choices(["Yes", "No"])
.value(1)
.rewind(true)
.foreground(color)
@@ -337,7 +337,7 @@ impl BookmarkSavePassword {
.sides(BorderSides::BOTTOM | BorderSides::LEFT | BorderSides::RIGHT)
.modifiers(BorderType::Rounded),
)
.choices(&["Yes", "No"])
.choices(["Yes", "No"])
.value(0)
.rewind(true)
.foreground(color)
+7 -5
View File
@@ -36,9 +36,9 @@ impl RemoteProtocolRadio {
.modifiers(BorderType::Rounded),
)
.choices(if cfg!(smb) {
&["SFTP", "SCP", "FTP", "FTPS", "S3", "Kube", "WebDAV", "SMB"]
vec!["SFTP", "SCP", "FTP", "FTPS", "S3", "Kube", "WebDAV", "SMB"].into_iter()
} else {
&["SFTP", "SCP", "FTP", "FTPS", "S3", "Kube", "WebDAV"]
vec!["SFTP", "SCP", "FTP", "FTPS", "S3", "Kube", "WebDAV"].into_iter()
})
.foreground(color)
.rewind(true)
@@ -126,7 +126,7 @@ impl HostBridgeProtocolRadio {
.modifiers(BorderType::Rounded),
)
.choices(if cfg!(smb) {
&[
vec![
"Localhost",
"SFTP",
"SCP",
@@ -137,8 +137,9 @@ impl HostBridgeProtocolRadio {
"WebDAV",
"SMB",
]
.into_iter()
} else {
&[
vec![
"Localhost",
"SFTP",
"SCP",
@@ -148,6 +149,7 @@ impl HostBridgeProtocolRadio {
"Kube",
"WebDAV",
]
.into_iter()
})
.foreground(color)
.rewind(true)
@@ -649,7 +651,7 @@ impl RadioS3NewPathStyle {
.color(color)
.modifiers(BorderType::Rounded),
)
.choices(&["Yes", "No"])
.choices(["Yes", "No"])
.foreground(color)
.rewind(true)
.title("New path style", Alignment::Left)
+7 -13
View File
@@ -28,7 +28,7 @@ impl ErrorPopup {
.modifiers(BorderType::Rounded),
)
.foreground(color)
.text(&[TextSpan::from(text.as_ref())])
.text([TextSpan::from(text.as_ref())])
.wrap(true),
}
}
@@ -64,7 +64,7 @@ impl InfoPopup {
.modifiers(BorderType::Rounded),
)
.foreground(color)
.text(&[TextSpan::from(text.as_ref())])
.text([TextSpan::from(text.as_ref())])
.wrap(true),
}
}
@@ -100,7 +100,7 @@ impl WaitPopup {
.modifiers(BorderType::Rounded),
)
.foreground(color)
.text(&[TextSpan::from(text.as_ref())])
.text([TextSpan::from(text.as_ref())])
.wrap(true),
}
}
@@ -130,7 +130,7 @@ impl WindowSizeError {
.modifiers(BorderType::Rounded),
)
.foreground(color)
.text(&[TextSpan::from(
.text([TextSpan::from(
"termscp requires at least 24 lines of height to run",
)])
.wrap(true),
@@ -163,7 +163,7 @@ impl QuitPopup {
.foreground(color)
.title("Quit termscp?", Alignment::Center)
.rewind(true)
.choices(&["Yes", "No"]),
.choices(["Yes", "No"]),
}
}
}
@@ -230,7 +230,7 @@ impl InstallUpdatePopup {
.foreground(color)
.title("Install update?", Alignment::Center)
.rewind(true)
.choices(&["Yes", "No"]),
.choices(["Yes", "No"]),
}
}
}
@@ -296,13 +296,7 @@ impl ReleaseNotes {
)
.foreground(color)
.title("Release notes", Alignment::Center)
.text_rows(
notes
.lines()
.map(TextSpan::from)
.collect::<Vec<TextSpan>>()
.as_slice(),
),
.text_rows(notes.lines().map(TextSpan::from)),
}
}
}
+2 -2
View File
@@ -64,7 +64,7 @@ pub struct NewVersionDisclaimer {
impl NewVersionDisclaimer {
pub fn new(new_version: &str, color: Color) -> Self {
Self {
component: Span::default().foreground(color).spans(&[
component: Span::default().foreground(color).spans([
TextSpan::from("termscp "),
TextSpan::new(new_version).underlined().bold(),
TextSpan::from(
@@ -91,7 +91,7 @@ pub struct HelpFooter {
impl HelpFooter {
pub fn new(key_color: Color) -> Self {
Self {
component: Span::default().spans(&[
component: Span::default().spans([
TextSpan::from("<F1|CTRL+H>").bold().fg(key_color),
TextSpan::from(" Help "),
TextSpan::from("<CTRL+C>").bold().fg(key_color),