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 Jul 12, 2024
1 parent c02de5b commit 0bd373d
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 0bd373d

Please sign in to comment.