diff --git a/src/ear.rs b/src/ear.rs index dd5b328..9b80e28 100644 --- a/src/ear.rs +++ b/src/ear.rs @@ -108,7 +108,7 @@ fn handle_get_request(request: Request, mut sender: Mouth) { match request.section.as_str() { "titre" => match database::search_title_from_titre(&request.requested_data) { Ok(result) => { - if result.len() == 0 { + if result.is_empty() { sender.send_not_found(result); } else { sender.send_ok(result); @@ -118,7 +118,7 @@ fn handle_get_request(request: Request, mut sender: Mouth) { }, "favoris" => match database::search_favorites_from_titre(&request.requested_data) { Ok(result) => { - if result.len() == 0 { + if result.is_empty() { sender.send_not_found(result); } else { sender.send_ok(result);