Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Imobach González Sosa <igonzalezsosa@suse.com>
  • Loading branch information
jreidinger and imobachgs committed Apr 29, 2024
1 parent 5b23d77 commit 785dae7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rust/agama-lib/src/dbus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, HashMap<String, zvariant::OwnedValue>>;

/// 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<String, OwnedValue>,
name: &str,
Expand Down
2 changes: 1 addition & 1 deletion rust/agama-lib/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions rust/agama-lib/src/storage/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -90,7 +90,7 @@ impl TryFrom<zbus::zvariant::Value<'_>> for VolumeOutline {
}
}

/// Represents single volume
/// Represents a single volume
#[derive(Debug, Clone, Serialize, utoipa::ToSchema)]
#[serde(rename_all = "camelCase")]
pub struct Volume {
Expand Down

0 comments on commit 785dae7

Please sign in to comment.