#`by_ref` exists for mutable reference `&mut B`, but its trait bounds were not satisfied

2 messages · Page 1 of 1 (latest)

west cove
#

someone pick me up i am scared
https://paste.com.tr/avdqmfoe

Error originates at execute! command:

the method `by_ref` exists for mutable reference `&mut B`, but its trait bounds were not satisfied
the following trait bounds were not satisfied:
`B: std::io::Write`
which is required by `&mut B: std::io::Write`
`B: Iterator`
which is required by `&mut B: Iterator`rustcClick for full compiler diagnostic
macros.rs(63, 20): Actual error occurred here
macros.rs(114, 9): Error originated from macro call here
``` all i want to do is take the terminal, and do stuff on it 😦
west cove
#

error[E0599]: the method `by_ref` exists for mutable reference `&mut B`, but its trait bounds were not satisfied
  --> src/main.rs:51:5
   |
51 | /     execute!(
52 | |         terminal.backend_mut(),
53 | |         crossterm::terminal::LeaveAlternateScreen,
54 | |         crossterm::event::DisableMouseCapture
55 | |     )?;
   | |_____^ method cannot be called on `&mut B` due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `B: std::io::Write`
           which is required by `&mut B: std::io::Write`
           `B: Iterator`
           which is required by `&mut B: Iterator`
   = note: this error originates in the macro `$crate::queue` which comes from the expansion of the macro `execute` (in Nightly builds, run with -Z macro-backtrace for more info)