From 4f954112b8c8cf266a8338cc86166f912c2da88c Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 21 Sep 2021 22:43:20 +0200 Subject: Byte differ --- src/actions/shift.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/actions/shift.rs') diff --git a/src/actions/shift.rs b/src/actions/shift.rs index 437fcb4..6880c20 100644 --- a/src/actions/shift.rs +++ b/src/actions/shift.rs @@ -32,7 +32,7 @@ pub fn shift(command_options: ActionOptions, path: &str, new_cursor: usize) -> R working_file.rewind()?; working_file.set_len(0)?; - working_file.write_all(new_content.as_bytes())?; + working_file.write_all(&new_content)?; } file_history.write_to_file(&mut history_file)?; @@ -47,7 +47,7 @@ pub fn shift(command_options: ActionOptions, path: &str, new_cursor: usize) -> R let mut new_working_file = deleted.create_working_file(&locations)?; let new_content = file_history.get_content(); - new_working_file.write_all(new_content.as_bytes())?; + new_working_file.write_all(&new_content)?; } } FileState::Untracked(_) => panic!("File is not tracked with Ka."), -- cgit 1.4.1