Skip to content

Commit

Permalink
get rid of unused warning for addstr
Browse files Browse the repository at this point in the history
  • Loading branch information
correabuscar committed Jun 20, 2024
1 parent 1f945ae commit c48ab05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cursive/src/backends/curses/n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ impl backend::Backend for Backend {
}

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

Expand Down

0 comments on commit c48ab05

Please sign in to comment.