util.rs: Correct a typo
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/706>
This commit is contained in:
@ -311,7 +311,7 @@ pub trait WarningHandler {
|
||||
fn handle(&mut self, warning: &str);
|
||||
}
|
||||
|
||||
/// Removes the first matcing item
|
||||
/// Removes the first matching item
|
||||
pub fn vec_remove<T, F: FnMut(&T) -> bool>(v: &mut Vec<T>, pred: F) -> Option<T> {
|
||||
let idx = v.iter().position(pred);
|
||||
idx.map(|idx| v.remove(idx))
|
||||
|
||||
Reference in New Issue
Block a user