From 785dae7c97ffd0420cc7957057ef944c046765b7 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 29 Apr 2024 12:36:22 +0200 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Imobach González Sosa --- rust/agama-lib/src/dbus.rs | 2 +- rust/agama-lib/src/error.rs | 2 +- rust/agama-lib/src/storage/client.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/agama-lib/src/dbus.rs b/rust/agama-lib/src/dbus.rs index faadc06f1d..b814f614b6 100644 --- a/rust/agama-lib/src/dbus.rs +++ b/rust/agama-lib/src/dbus.rs @@ -9,7 +9,7 @@ pub type NestedHash<'a> = HashMap<&'a str, HashMap<&'a str, zvariant::Value<'a>> /// Nested hash as it comes from D-Bus. pub type OwnedNestedHash = HashMap>; -/// Helper to get property of given type from ManagedObjects map or any generic dbus Hash with variant as value +/// Helper to get property of given type from ManagedObjects map or any generic D-Bus Hash with variant as value pub fn get_property<'a, T>( properties: &'a HashMap, name: &str, diff --git a/rust/agama-lib/src/error.rs b/rust/agama-lib/src/error.rs index 775336256f..5ef274afe3 100644 --- a/rust/agama-lib/src/error.rs +++ b/rust/agama-lib/src/error.rs @@ -10,7 +10,7 @@ pub enum ServiceError { DBus(#[from] zbus::Error), #[error("Could not connect to Agama bus at '{0}': {1}")] DBusConnectionError(String, #[source] zbus::Error), - #[error("Unexpected type on DBus '{0}'")] + #[error("Unexpected type on D-Bus '{0}'")] ZVariant(#[from] zvariant::Error), // it's fine to say only "Error" because the original // specific error will be printed too diff --git a/rust/agama-lib/src/storage/client.rs b/rust/agama-lib/src/storage/client.rs index 4804890bfd..3c49b2866c 100644 --- a/rust/agama-lib/src/storage/client.rs +++ b/rust/agama-lib/src/storage/client.rs @@ -21,7 +21,7 @@ pub struct StorageDevice { description: String, } -/// Represent single change action done to storage +/// Represents a single change action done to storage #[derive(Debug, Clone, Serialize, utoipa::ToSchema)] #[serde(rename_all = "camelCase")] pub struct Action { @@ -90,7 +90,7 @@ impl TryFrom> for VolumeOutline { } } -/// Represents single volume +/// Represents a single volume #[derive(Debug, Clone, Serialize, utoipa::ToSchema)] #[serde(rename_all = "camelCase")] pub struct Volume {