From 62a934fc209a004bab8296fc987a3a5e6c031f38 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Tue, 2 Apr 2024 08:53:27 +1100 Subject: [PATCH] don't say ok after errors --- Cargo.lock | 4 ++-- homekit-controller/Cargo.toml | 6 ++++-- homekit-controller/src/lib.rs | 14 +++----------- homekit-exporter/Cargo.toml | 2 +- homekit-exporter/packaging/PKGBUILD | 2 +- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b55608..e5e718c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1120,7 +1120,7 @@ dependencies = [ [[package]] name = "homekit-controller" -version = "0.5.3" +version = "0.5.5" dependencies = [ "chacha20poly1305", "ed25519-dalek", @@ -1143,7 +1143,7 @@ dependencies = [ [[package]] name = "homekit-exporter" -version = "0.5.4" +version = "0.5.5" dependencies = [ "clap", "env_logger", diff --git a/homekit-controller/Cargo.toml b/homekit-controller/Cargo.toml index c3be496..409c432 100644 --- a/homekit-controller/Cargo.toml +++ b/homekit-controller/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "homekit-controller" -version = "0.5.3" +version = "0.5.5" edition = "2021" +license = "Apache-2.0" +description = "Partial implementation of the HomeKit controller protocol" +authors = ["Alex Janka"] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] serde = { version = "1.0", features = ["derive"] } diff --git a/homekit-controller/src/lib.rs b/homekit-controller/src/lib.rs index 97be304..f82e7b4 100644 --- a/homekit-controller/src/lib.rs +++ b/homekit-controller/src/lib.rs @@ -334,23 +334,15 @@ impl DeviceConnection { } Some(socket) => { for (aid, data) in &mut self.accessories { - 's: for service in data.services.values_mut() { + for service in data.services.values_mut() { let characteristic_ids = service .characteristics .keys() .map(|k| format!("{aid}.{k}")) .collect::>(); - let characteristics = match socket + let characteristics = socket .get_characteristics(&characteristic_ids, additional_data) - .await - { - Ok(v) => v, - Err(e) => { - log::warn!("{}error getting characteristics{} {characteristic_ids:?}:\n\t{e:?}", formatted_name(&self.name), service.name.as_ref().map(|n|format!(" for {n}")).unwrap_or_default()); - - continue 's; - } - }; + .await?; for (cid, c) in &characteristics { if c.characteristic_type == CharacteristicType::Name { if let Some(Data::String(name)) = &c.value { diff --git a/homekit-exporter/Cargo.toml b/homekit-exporter/Cargo.toml index bfbd6a2..d497433 100644 --- a/homekit-exporter/Cargo.toml +++ b/homekit-exporter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "homekit-exporter" -version = "0.5.4" +version = "0.5.5" edition = "2021" license = "Apache-2.0" description = "Prometheus exporter for HomeKit sensors" diff --git a/homekit-exporter/packaging/PKGBUILD b/homekit-exporter/packaging/PKGBUILD index f7d0d56..608948b 100644 --- a/homekit-exporter/packaging/PKGBUILD +++ b/homekit-exporter/packaging/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alex Janka pkgname=homekit-logger -pkgver=0.5.4 +pkgver=0.5.5 pkgrel=1 pkgdesc="Prometheus exporter for HomeKit sensors" arch=('x86_64' 'aarch64')