diff --git a/build.rs b/build.rs index 4dd39dd..0102220 100644 --- a/build.rs +++ b/build.rs @@ -26,8 +26,7 @@ fn main() -> std::io::Result<()> { .map(|e| e.unwrap()) .filter(|e| { e.path() - .extension() - .map_or(false, |ext| ext.to_str().unwrap() == "proto") + .extension().is_some_and(|ext| ext.to_str().unwrap() == "proto") }) { let path = entry.path(); diff --git a/src/utils_internal.rs b/src/utils_internal.rs index 171a599..acd4629 100644 --- a/src/utils_internal.rs +++ b/src/utils_internal.rs @@ -420,6 +420,6 @@ mod tests { let data = vec![0x00; 0x10000]; let serial_data = format_data_packet(data.into()); - assert_eq!(serial_data.is_err(), true); + assert!(serial_data.is_err()); } }