diff --git a/x11rb/src/cursor/find_cursor.rs b/x11rb/src/cursor/find_cursor.rs index e8c6dd78..2b0d4170 100644 --- a/x11rb/src/cursor/find_cursor.rs +++ b/x11rb/src/cursor/find_cursor.rs @@ -96,9 +96,8 @@ static CORE_CURSORS: &[(&str, u16)] = &[ fn cursor_shape_to_id(name: &str) -> Option { CORE_CURSORS .iter() - .filter(|&(name2, _)| name == *name2) + .find(|&(name2, _)| name == *name2) .map(|&(_, id)| id) - .next() } #[cfg(test)]