mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Clippy
This commit is contained in:
@@ -193,7 +193,7 @@ impl SetupActivity {
|
|||||||
}
|
}
|
||||||
UserInterfaceInputField::FileFmt => {
|
UserInterfaceInputField::FileFmt => {
|
||||||
// Push char to current file fmt
|
// Push char to current file fmt
|
||||||
let mut file_fmt = config_cli.get_file_fmt().unwrap_or(String::new());
|
let mut file_fmt = config_cli.get_file_fmt().unwrap_or_default();
|
||||||
// Pop from file fmt
|
// Pop from file fmt
|
||||||
file_fmt.pop();
|
file_fmt.pop();
|
||||||
// If len is 0, will become None
|
// If len is 0, will become None
|
||||||
@@ -354,7 +354,7 @@ impl SetupActivity {
|
|||||||
}
|
}
|
||||||
UserInterfaceInputField::FileFmt => {
|
UserInterfaceInputField::FileFmt => {
|
||||||
// Push char to current file fmt
|
// Push char to current file fmt
|
||||||
let mut file_fmt = config_cli.get_file_fmt().unwrap_or(String::new());
|
let mut file_fmt = config_cli.get_file_fmt().unwrap_or_default();
|
||||||
file_fmt.push(ch);
|
file_fmt.push(ch);
|
||||||
// update value
|
// update value
|
||||||
config_cli.set_file_fmt(file_fmt);
|
config_cli.set_file_fmt(file_fmt);
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ impl SetupActivity {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
UserInterfaceInputField::FileFmt => {
|
UserInterfaceInputField::FileFmt => {
|
||||||
let file_fmt: String = cli.get_file_fmt().unwrap_or(String::new());
|
let file_fmt: String = cli.get_file_fmt().unwrap_or_default();
|
||||||
f.set_cursor(
|
f.set_cursor(
|
||||||
ui_cfg_chunks[4].x + file_fmt.width() as u16 + 1,
|
ui_cfg_chunks[4].x + file_fmt.width() as u16 + 1,
|
||||||
ui_cfg_chunks[4].y + 1,
|
ui_cfg_chunks[4].y + 1,
|
||||||
@@ -412,7 +412,7 @@ impl SetupActivity {
|
|||||||
fn draw_file_fmt_input(&self) -> Option<Paragraph> {
|
fn draw_file_fmt_input(&self) -> Option<Paragraph> {
|
||||||
match &self.config_cli {
|
match &self.config_cli {
|
||||||
Some(cli) => Some(
|
Some(cli) => Some(
|
||||||
Paragraph::new(cli.get_file_fmt().unwrap_or(String::new()))
|
Paragraph::new(cli.get_file_fmt().unwrap_or_default())
|
||||||
.style(Style::default().fg(match &self.tab {
|
.style(Style::default().fg(match &self.tab {
|
||||||
SetupTab::SshConfig => Color::White,
|
SetupTab::SshConfig => Color::White,
|
||||||
SetupTab::UserInterface(field) => match field {
|
SetupTab::UserInterface(field) => match field {
|
||||||
|
|||||||
Reference in New Issue
Block a user