From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 4EBE41FF170 for ; Tue, 3 Dec 2024 11:16:20 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 522552FEA3; Tue, 3 Dec 2024 11:16:24 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Tue, 3 Dec 2024 11:15:17 +0100 Message-ID: <20241203101542.261333-2-c.heiss@proxmox.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241203101542.261333-1-c.heiss@proxmox.com> References: <20241203101542.261333-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.172 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_SBL_A 0.1 Contains URL's A record listed in the Spamhaus SBL blocklist [185.199.111.153, 185.199.108.153, 185.199.110.153, 185.199.109.153] Subject: [pve-devel] [PATCH installer 1/2] tree-wide: fix rustdoc warnings X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Mostly URLs, which need to be surrounded by < > to be properly formatted. Signed-off-by: Christoph Heiss --- proxmox-auto-install-assistant/src/main.rs | 10 +++++---- proxmox-installer-common/src/options.rs | 6 +++--- proxmox-installer-common/src/utils.rs | 23 ++++++++++++++------- proxmox-post-hook/src/main.rs | 8 +++---- proxmox-tui-installer/src/views/bootdisk.rs | 2 +- 5 files changed, 29 insertions(+), 20 deletions(-) diff --git a/proxmox-auto-install-assistant/src/main.rs b/proxmox-auto-install-assistant/src/main.rs index d7aa134..c837cba 100644 --- a/proxmox-auto-install-assistant/src/main.rs +++ b/proxmox-auto-install-assistant/src/main.rs @@ -53,10 +53,10 @@ struct CommandDeviceInfo { /// Test which devices the given filter matches against /// /// Filters support the following syntax: -/// ? Match a single character -/// * Match any number of characters -/// [a], [0-9] Specific character or range of characters -/// [!a] Negate a specific character of range +/// - `?` Match a single character +/// - `*` Match any number of characters +/// - `[a]`, `[0-9]` Specific character or range of characters +/// - `[!a]` Negate a specific character of range /// /// To avoid globbing characters being interpreted by the shell, use single quotes. /// Multiple filters can be defined. @@ -64,7 +64,9 @@ struct CommandDeviceInfo { /// Examples: /// Match disks against the serial number and device name, both must match: /// +/// ```sh /// proxmox-auto-install-assistant match --filter-match all disk 'ID_SERIAL_SHORT=*2222*' 'DEVNAME=*nvme*' +/// ``` #[derive(Args, Debug)] #[command(verbatim_doc_comment)] struct CommandDeviceMatch { diff --git a/proxmox-installer-common/src/options.rs b/proxmox-installer-common/src/options.rs index 37e6260..6ec7d5c 100644 --- a/proxmox-installer-common/src/options.rs +++ b/proxmox-installer-common/src/options.rs @@ -463,13 +463,13 @@ impl NetworkOptions { } } -/// Validates an email address using the regex for elements -/// as defined in the HTML specification [0]. +/// Validates an email address using the regex for `` elements +/// as defined in the [HTML specification]. /// Using that /should/ cover all possible cases that are encountered in the wild. /// /// It additionally checks whether the email our default email placeholder value. /// -/// [0] https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address +/// [HTML specification]: pub fn email_validate(email: &str) -> Result<()> { static RE: OnceLock = OnceLock::new(); let re = RE.get_or_init(|| { diff --git a/proxmox-installer-common/src/utils.rs b/proxmox-installer-common/src/utils.rs index 2579c80..8686edf 100644 --- a/proxmox-installer-common/src/utils.rs +++ b/proxmox-installer-common/src/utils.rs @@ -151,22 +151,29 @@ impl fmt::Display for FqdnParseError { /// A type for safely representing fully-qualified domain names (FQDNs). /// /// It considers following RFCs: -/// https://www.ietf.org/rfc/rfc952.txt (sec. "ASSUMPTIONS", 1.) -/// https://www.ietf.org/rfc/rfc1035.txt (sec. 2.3. "Conventions") -/// https://www.ietf.org/rfc/rfc1123.txt (sec. 2.1. "Host Names and Numbers") -/// https://www.ietf.org/rfc/rfc3492.txt -/// https://www.ietf.org/rfc/rfc4343.txt +/// - [RFC952] (sec. "ASSUMPTIONS", 1.) +/// - [RFC1035] (sec. 2.3. "Conventions") +/// - [RFC1123] (sec. 2.1. "Host Names and Numbers") +/// - [RFC3492] +/// - [RFC4343] /// /// .. and applies some restriction given by Debian, e.g. 253 instead of 255 -/// maximum total length and maximum 63 characters per label. -/// https://manpages.debian.org/stable/manpages/hostname.7.en.html +/// maximum total length and maximum 63 characters per label, per the +/// [hostname(7)]. /// /// Additionally: /// - It enforces the restriction as per Bugzilla #1054, in that /// purely numeric hostnames are not allowed - against RFC1123 sec. 2.1. /// /// Some terminology: -/// - "label" - a single part of a FQDN, e.g.