We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8cfd07 commit 269c15cCopy full SHA for 269c15c
src/monitor.rs
@@ -126,7 +126,7 @@ impl Monitor {
126
///
127
///If `Shutdown` request detected, then return `Ok(false)`
128
pub fn recv(&mut self) -> Result<bool, ErrorCode> {
129
- for msg in self.iter() {
+ if let Some(msg) = self.iter().next() {
130
let msg = msg?;
131
match msg.id() {
132
WM_CLIPBOARDUPDATE => return Ok(msg.inner().lParam != CLOSE_PARAM),
0 commit comments