From 1904585449c4a49d856cbc48ecae985223d99e9a Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Thu, 14 Mar 2024 19:38:40 +0100 Subject: [PATCH] Clippy fixes. --- examples/blinky.rs | 2 +- src/btuuid.rs | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/blinky.rs b/examples/blinky.rs index 83040f8..646abe3 100644 --- a/examples/blinky.rs +++ b/examples/blinky.rs @@ -46,7 +46,7 @@ async fn main() -> Result<(), Box> { let service = match device .discover_services_with_uuid(NORDIC_LED_AND_BUTTON_SERVICE) .await? - .get(0) + .first() { Some(service) => service.clone(), None => return Err("service not found".into()), diff --git a/src/btuuid.rs b/src/btuuid.rs index d55bccf..d4f44c8 100644 --- a/src/btuuid.rs +++ b/src/btuuid.rs @@ -107,9 +107,8 @@ mod private { } /// Bluetooth GATT Service 16-bit UUIDs +#[allow(missing_docs)] pub mod services { - #![allow(missing_docs)] - use super::bluetooth_uuid_from_u16; use crate::Uuid; @@ -179,9 +178,8 @@ pub mod services { } /// Bluetooth GATT Characteristic 16-bit UUIDs +#[allow(missing_docs)] pub mod characteristics { - #![allow(missing_docs)] - use super::bluetooth_uuid_from_u16; use crate::Uuid; @@ -590,9 +588,8 @@ pub mod characteristics { } /// Bluetooth GATT Descriptor 16-bit UUIDs +#[allow(missing_docs)] pub mod descriptors { - #![allow(missing_docs)] - use super::bluetooth_uuid_from_u16; use crate::Uuid;