mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 07:21:14 -03:00
Address some unused_must_use warnings for ControlFlow
As seen on nightly Rust.
This commit is contained in:
@@ -663,7 +663,8 @@ fn index_mut(&mut self, index: usize) -> &mut Self::Output {
|
||||
impl Acceptor for $name {
|
||||
#[allow(unused_variables)]
|
||||
fn accept<'a>(&'a self, visitor: &mut dyn NodeVisitor<'a>, reversed: bool) {
|
||||
accept_list_visitor!(Self, accept, visit, self, visitor, reversed, $contents);
|
||||
let _ =
|
||||
accept_list_visitor!(Self, accept, visit, self, visitor, reversed, $contents);
|
||||
}
|
||||
}
|
||||
impl AcceptorMut for $name {
|
||||
@@ -3819,7 +3820,7 @@ fn allocate<T: NodeMut + Default>(&self) -> Box<T> {
|
||||
// Return the resulting Node pointer. It is never null.
|
||||
fn allocate_visit<T: NodeMut + Default>(&mut self) -> Box<T> {
|
||||
let mut result = Box::<T>::default();
|
||||
self.visit_mut(&mut *result);
|
||||
let _ = self.visit_mut(&mut *result);
|
||||
result
|
||||
}
|
||||
|
||||
|
||||
@@ -1008,7 +1008,7 @@ pub fn reader_execute_readline_cmd(parser: &Parser, ch: CharEvent) {
|
||||
data.rls = Some(ReadlineLoopState::new());
|
||||
}
|
||||
data.save_screen_state();
|
||||
data.handle_char_event(Some(ch));
|
||||
let _ = data.handle_char_event(Some(ch));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user