Skip to content

Commit 0bd373d

Browse files
committed
get rid of unused warning for addstr
1 parent c02de5b commit 0bd373d

File tree

1 file changed

+3
-1
lines changed
  • cursive/src/backends/curses

1 file changed

+3
-1
lines changed

cursive/src/backends/curses/n.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,9 @@ impl backend::Backend for Backend {
405405
}
406406

407407
fn print(&self, text: &str) {
408-
ncurses::addstr(text);
408+
// &str is assured it doesn't contain any \0 aka nuls here due to PR 786
409+
// thus we can ignore the return value and avoid warning: unused `Result` that must be used
410+
let _ = ncurses::addstr(text);
409411
}
410412
}
411413

0 commit comments

Comments
 (0)