From 5116d051a88fd034e4f7ef16e4f21b769e1fae33 Mon Sep 17 00:00:00 2001 From: Gabriel Goller Date: Fri, 10 Nov 2023 13:53:24 +0100 Subject: [PATCH] docs: rustdoc warnings Fixed a few rustdoc warnings. Converted some 'html'-links to intra-doc-links and surrounded paths with '`'. Signed-off-by: Gabriel Goller --- pbs-datastore/src/lib.rs | 4 ++-- pbs-tape/src/sgutils2.rs | 2 +- src/api2/node/disks/directory.rs | 4 ++-- src/api2/node/disks/zfs.rs | 2 +- src/bin/proxmox_backup_debug/api.rs | 6 +++--- src/bin/proxmox_backup_manager/disk.rs | 4 ++-- src/tools/disks/mod.rs | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pbs-datastore/src/lib.rs b/pbs-datastore/src/lib.rs index b09fd114a..43050162f 100644 --- a/pbs-datastore/src/lib.rs +++ b/pbs-datastore/src/lib.rs @@ -21,7 +21,7 @@ //! chunks (VMs, whole block devices). //! //! A chunk is defined as a binary blob, which is stored inside a -//! [ChunkStore](struct.ChunkStore.html) instead of the backup directory +//! [ChunkStore] instead of the backup directory //! directly, and can be addressed by its SHA256 digest. //! //! @@ -98,7 +98,7 @@ //! still referenced. //! //! To do this we use the -//! [ProcessLocker](../tools/struct.ProcessLocker.html). +//! [ProcessLocker](proxmox_sys::process_locker::ProcessLocker). //! //! ### ChunkStore-wide //! diff --git a/pbs-tape/src/sgutils2.rs b/pbs-tape/src/sgutils2.rs index afe855013..47fe094ac 100644 --- a/pbs-tape/src/sgutils2.rs +++ b/pbs-tape/src/sgutils2.rs @@ -893,7 +893,7 @@ fn scsi_cmd_mode_sense( /// True if the given sense info is INVALID COMMAND OPERATION CODE /// means that the device does not know/support the command -/// https://www.t10.org/lists/asc-num.htm#ASC_20 +/// pub fn sense_err_is_invalid_command(err: &SenseInfo) -> bool { err.sense_key == SENSE_KEY_ILLEGAL_REQUEST && err.asc == 0x20 && err.ascq == 0x00 } diff --git a/src/api2/node/disks/directory.rs b/src/api2/node/disks/directory.rs index d5a16be73..5e1cb124b 100644 --- a/src/api2/node/disks/directory.rs +++ b/src/api2/node/disks/directory.rs @@ -135,7 +135,7 @@ pub fn list_datastore_mounts() -> Result, Error> { permission: &Permission::Privilege(&["system", "disks"], PRIV_SYS_MODIFY, false), }, )] -/// Create a Filesystem on an unused disk. Will be mounted under '/mnt/datastore/'.". +/// Create a Filesystem on an unused disk. Will be mounted under `/mnt/datastore/`. pub fn create_datastore_disk( name: String, disk: String, @@ -235,7 +235,7 @@ pub fn create_datastore_disk( permission: &Permission::Privilege(&["system", "disks"], PRIV_SYS_MODIFY, false), }, )] -/// Remove a Filesystem mounted under '/mnt/datastore/'. +/// Remove a Filesystem mounted under `/mnt/datastore/`. pub fn delete_datastore_disk(name: String) -> Result<(), Error> { let path = format!("{}{}", BASE_MOUNT_DIR, name); // path of datastore cannot be changed diff --git a/src/api2/node/disks/zfs.rs b/src/api2/node/disks/zfs.rs index c8d221cc5..673dc1bf4 100644 --- a/src/api2/node/disks/zfs.rs +++ b/src/api2/node/disks/zfs.rs @@ -147,7 +147,7 @@ pub fn zpool_details(name: String) -> Result { permission: &Permission::Privilege(&["system", "disks"], PRIV_SYS_MODIFY, false), }, )] -/// Create a new ZFS pool. Will be mounted under '/mnt/datastore/'. +/// Create a new ZFS pool. Will be mounted under `/mnt/datastore/`. pub fn create_zpool( name: String, devices: String, diff --git a/src/bin/proxmox_backup_debug/api.rs b/src/bin/proxmox_backup_debug/api.rs index 3a7ef5395..42fa51f41 100644 --- a/src/bin/proxmox_backup_debug/api.rs +++ b/src/bin/proxmox_backup_debug/api.rs @@ -301,7 +301,7 @@ async fn call_api_and_format_result( }, }, )] -/// Call API on +/// Call API on `` async fn api_call( method: String, api_path: String, @@ -327,7 +327,7 @@ async fn api_call( }, }, )] -/// Get API usage information for +/// Get API usage information for `` async fn usage( path: String, verbose: bool, @@ -427,7 +427,7 @@ async fn get_api_children( }, }, )] -/// Get API usage information for +/// Get API usage information for `` async fn ls( path: Option, mut param: Value, diff --git a/src/bin/proxmox_backup_manager/disk.rs b/src/bin/proxmox_backup_manager/disk.rs index 73cb95e68..670ac713a 100644 --- a/src/bin/proxmox_backup_manager/disk.rs +++ b/src/bin/proxmox_backup_manager/disk.rs @@ -299,7 +299,7 @@ fn list_datastore_mounts( }, }, )] -/// Create a Filesystem on an unused disk. Will be mounted under '/mnt/datastore/'. +/// Create a Filesystem on an unused disk. Will be mounted under `/mnt/datastore/`. async fn create_datastore_disk( mut param: Value, rpcenv: &mut dyn RpcEnvironment, @@ -326,7 +326,7 @@ async fn create_datastore_disk( }, }, )] -/// Remove a Filesystem mounted under '/mnt/datastore/'. +/// Remove a Filesystem mounted under `/mnt/datastore/`. async fn delete_datastore_disk( mut param: Value, rpcenv: &mut dyn RpcEnvironment, diff --git a/src/tools/disks/mod.rs b/src/tools/disks/mod.rs index 72e374cab..8b6d470b2 100644 --- a/src/tools/disks/mod.rs +++ b/src/tools/disks/mod.rs @@ -547,7 +547,7 @@ pub enum DiskType { } #[derive(Debug)] -/// Represents the contents of the /sys/block//stat file. +/// Represents the contents of the `/sys/block//stat` file. pub struct BlockDevStat { pub read_ios: u64, pub read_sectors: u64, @@ -668,7 +668,7 @@ pub struct PartitionInfo { #[serde(rename_all = "kebab-case")] /// Information about how a Disk is used pub struct DiskUsageInfo { - /// Disk name (/sys/block/) + /// Disk name (`/sys/block/`) pub name: String, pub used: DiskUsageType, pub disk_type: DiskType,