Skip to content

Commit 461dc00

Browse files
committed
fix deprecation and clippy warnings
1 parent dcce86c commit 461dc00

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

bench/benches/bench.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
1+
use criterion::{criterion_group, criterion_main, Criterion};
22
use keybinds::{Key, KeyInput, KeySeq, Keybinds, Mods};
3+
use std::hint::black_box;
34
use std::str::FromStr;
45

56
#[derive(Clone)]

examples/minimal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn main() -> io::Result<()> {
1717
keybinds.bind("Esc", Action::ExitApp).unwrap();
1818

1919
println!("Type inputs and send it by hitting Enter key. Send Esc to exit");
20-
for b in io::stdin().bytes() {
20+
for b in io::stdin().lock().bytes() {
2121
// Convert your key input into `KeyInput` struct
2222
let input = match b? {
2323
b'\x1b' => KeyInput::from(Key::Esc),

examples/vim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ fn main() -> io::Result<()> {
461461
TextArea::default()
462462
};
463463

464-
let mut vim = Vim::new(textarea).map_err(|e| io::Error::new(io::ErrorKind::Other, e))?;
464+
let mut vim = Vim::new(textarea).map_err(io::Error::other)?;
465465

466466
loop {
467467
term.draw(|f| f.render_widget(&vim.textarea, f.area()))?;

0 commit comments

Comments
 (0)