Fix clippy errors

This commit is contained in:
Clémentine Urquizar 2021-06-08 18:02:04 +02:00
parent 0da8fa115e
commit 9e69f33f3c
No known key found for this signature in database
GPG Key ID: D8E7CC7422E77E1A

View File

@ -135,9 +135,9 @@ impl Index {
let mut attr_name = attribute.clone(); let mut attr_name = attribute.clone();
let mut attr_len = query.crop_length; let mut attr_len = query.crop_length;
if attr_name.contains(":") { if attr_name.contains(':') {
let mut split = attr_name.rsplit(':'); let mut split = attr_name.rsplit(':');
attr_len = match split.nth(0) { attr_len = match split.next() {
Some(s) => s.parse::<usize>().ok(), Some(s) => s.parse::<usize>().ok(),
None => None, None => None,
}; };