Skip to content

Commit

Permalink
fixup clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Aug 5, 2024
1 parent 49ad340 commit 81c6e92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1658,10 +1658,10 @@ impl Reedline {
match &mut self.buffer_editor {
Some(BufferEditor {
ref mut command,
temp_file,
ref temp_file,
}) => {
{
let mut file = File::create(&temp_file)?;
let mut file = File::create(temp_file)?;
write!(file, "{}", self.editor.get_buffer())?;
}
{
Expand Down
5 changes: 1 addition & 4 deletions src/menu/ide_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1054,10 +1054,7 @@ fn truncate_string_list(list: &mut [String], truncation_chars: &str) {
let mut new_line = String::new();
for grapheme in chars.into_iter().rev() {
if to_replace > 0 {
new_line.insert_str(
0,
&truncation_chars[truncation_len - to_replace].to_string(),
);
new_line.insert(0, truncation_chars[truncation_len - to_replace]);
to_replace -= 1;
} else {
new_line.insert_str(0, grapheme);
Expand Down

0 comments on commit 81c6e92

Please sign in to comment.