From 7fa08e31c64f5ed52a95bbd4efc53033304b8c08 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 11 Feb 2026 14:14:07 +1100 Subject: [PATCH] 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. --- src/screen.rs | 2 +- src/terminal.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/screen.rs b/src/screen.rs index 5fb921712..e51e844e9 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -761,7 +761,7 @@ fn abandon_line_string(screen_width: Option) -> Vec { // 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 { diff --git a/src/terminal.rs b/src/terminal.rs index 24961110a..1894e051e 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -606,7 +606,7 @@ pub fn contents(&self) -> &[u8] { pub fn contents_mut(&mut self) -> &mut Vec { &mut self.contents } - pub fn contents_move(self) -> Vec { + pub fn take_contents(self) -> Vec { self.contents }