mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 03:51:14 -03:00
Tweak naming for outputter buffer consumer
Rust idiomatic naming is "take" for "move", also Rust might actually move the object to a different memory adress, which is fine because all Rust objects are trivially relocatable.
This commit is contained in:
@@ -761,7 +761,7 @@ fn abandon_line_string(screen_width: Option<usize>) -> Vec<u8> {
|
||||
// line above your prompt. This doesn't make a difference in normal usage, but copying and
|
||||
// pasting your terminal log becomes a pain. This commit clears that line, making it an
|
||||
// actual empty line.
|
||||
abandon_line_string.contents_move()
|
||||
abandon_line_string.take_contents()
|
||||
}
|
||||
|
||||
impl Screen {
|
||||
|
||||
@@ -606,7 +606,7 @@ pub fn contents(&self) -> &[u8] {
|
||||
pub fn contents_mut(&mut self) -> &mut Vec<u8> {
|
||||
&mut self.contents
|
||||
}
|
||||
pub fn contents_move(self) -> Vec<u8> {
|
||||
pub fn take_contents(self) -> Vec<u8> {
|
||||
self.contents
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user