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 6, 2024
1 parent ac84199 commit 580aa85
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 @@ -401,7 +401,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 580aa85

Please sign in to comment.