summaryrefslogtreecommitdiffstats
path: root/src/commands/rename_file.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-05-05 20:11:36 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-05-05 20:11:36 -0400
commit4c194de5c7e940e1eaf71c0fb4b455ba6547c880 (patch)
tree331eb9908c67fe9a2f6d6e98e3b2d4f0901326bc /src/commands/rename_file.rs
parent6b013bb91969d7e269aa5a08da729a8370a31900 (diff)
use readline() instead of readline_with_initial with possible
Diffstat (limited to 'src/commands/rename_file.rs')
-rw-r--r--src/commands/rename_file.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commands/rename_file.rs b/src/commands/rename_file.rs
index 478a375..b4fa83c 100644
--- a/src/commands/rename_file.rs
+++ b/src/commands/rename_file.rs
@@ -47,13 +47,13 @@ impl RenameFile {
match self.method {
RenameFileMethod::Append => {
if let Some(ext) = start_str.rfind('.') {
- textfield.readline_with_initial(&start_str[0..ext], &start_str[ext..])
+ textfield.readline_with_initial((&start_str[0..ext], &start_str[ext..]))
} else {
- textfield.readline_with_initial(&start_str, "")
+ textfield.readline_with_initial((&start_str, ""))
}
}
- RenameFileMethod::Prepend => textfield.readline_with_initial("", &start_str),
- RenameFileMethod::Overwrite => textfield.readline_with_initial("", ""),
+ RenameFileMethod::Prepend => textfield.readline_with_initial(("", &start_str)),
+ RenameFileMethod::Overwrite => textfield.readline(),
}
};