diff options
| author | Mel <einebeere@gmail.com> | 2021-09-21 22:43:20 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2021-09-21 22:43:20 +0200 |
| commit | 4f954112b8c8cf266a8338cc86166f912c2da88c (patch) | |
| tree | dee4e22a7b6cf8d49ae582e9104bf406c0bc9b3b /src/actions/shift.rs | |
| parent | b86138b138565178b916b24d1e30d5786fd9d1c5 (diff) | |
| download | ka-4f954112b8c8cf266a8338cc86166f912c2da88c.tar.zst ka-4f954112b8c8cf266a8338cc86166f912c2da88c.zip | |
Byte differ
Diffstat (limited to 'src/actions/shift.rs')
| -rw-r--r-- | src/actions/shift.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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."), |
