From 0d912d664321456bb639ca916a82e56a9849a41a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 22 Oct 2024 15:26:35 +0200 Subject: [PATCH] api: add missing doc-comment description for api enums this is used as description in the api schema Signed-off-by: Thomas Lamprecht (cherry picked from commit 2d4209d9ef468a44e462905d609f07b7ca39ce84) --- src/api2/access/user.rs | 1 + src/tools/disks/mod.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api2/access/user.rs b/src/api2/access/user.rs index 1b4adaf8f..9d40e3519 100644 --- a/src/api2/access/user.rs +++ b/src/api2/access/user.rs @@ -200,6 +200,7 @@ pub fn read_user(userid: Userid, rpcenv: &mut dyn RpcEnvironment) -> Result Result, Err #[api()] #[derive(Debug, Serialize, Deserialize, Eq, PartialEq)] #[serde(rename_all = "lowercase")] +/// What a block device partition is used for. pub enum PartitionUsageType { /// Partition is not used (as far we can tell) Unused, @@ -661,6 +662,7 @@ pub enum PartitionUsageType { #[api()] #[derive(Debug, Serialize, Deserialize, Eq, PartialEq)] #[serde(rename_all = "lowercase")] +/// What a block device (disk) is used for. pub enum DiskUsageType { /// Disk is not used (as far we can tell) Unused, @@ -1220,6 +1222,7 @@ pub fn create_single_linux_partition(disk: &Disk) -> Result { #[api()] #[derive(Debug, Copy, Clone, Serialize, Deserialize, Eq, PartialEq)] #[serde(rename_all = "lowercase")] +/// A file system type supported by our tooling. pub enum FileSystemType { /// Linux Ext4 Ext4, @@ -1233,7 +1236,7 @@ impl std::fmt::Display for FileSystemType { FileSystemType::Ext4 => "ext4", FileSystemType::Xfs => "xfs", }; - write!(f, "{}", text) + write!(f, "{text}") } }