From c75bd1cb4fb1bed07ac45d9b68a8f81da7f2b1c4 Mon Sep 17 00:00:00 2001 From: chrysn Date: Mon, 19 Aug 2024 09:26:47 +0200 Subject: [PATCH] shell: Remove _providing_buf suffix from names, making the old versions deprecated aliases --- src/shell.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/shell.rs b/src/shell.rs index 3f99517..7d15cf0 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -151,10 +151,9 @@ pub trait CommandList()` to alter that. The method will be renamed to - /// `run_forever` once that name is free. + /// trait type; use `.with_buffer_size::<>()` to alter that. #[doc(alias = "shell_run_forever")] - fn run_forever_providing_buf(&mut self) -> ! { + fn run_forever(&mut self) -> ! { let mut linebuffer = [0; BUFSIZE]; self.run_forever_with_buf(&mut linebuffer) } @@ -166,14 +165,23 @@ pub trait CommandList()` to alter that. The method will be renamed to - /// `run_once` once that name is free. + /// trait type; use `.with_buffer_size::<>()` to alter that. #[doc(alias = "shell_run_once")] - fn run_once_providing_buf(&mut self) { + fn run_once(&mut self) { let mut linebuffer = [0; BUFSIZE]; self.run_once_with_buf(&mut linebuffer) } + #[deprecated(note = "Renamed to run_forever", since = "0.9")] + fn run_forever_providing_buf(&mut self) -> ! { + self.run_forever() + } + + #[deprecated(note = "Renamed to run_once", since = "0.9")] + fn run_once_providing_buf(&mut self) { + self.run_once() + } + /// Extend the list of commands by an additional one. /// /// The handler will be called every time the command is entered, and is passed the arguments