From e0bbfc07afaf36cbd1dd8d6bfe442dcf9f9a69b7 Mon Sep 17 00:00:00 2001 From: Stefan Kreutz Date: Sun, 11 Dec 2022 14:37:08 +0100 Subject: Deny missings docs --- wpa-psk/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'wpa-psk/src/lib.rs') diff --git a/wpa-psk/src/lib.rs b/wpa-psk/src/lib.rs index 56bbf11..5acf8e5 100644 --- a/wpa-psk/src/lib.rs +++ b/wpa-psk/src/lib.rs @@ -26,6 +26,7 @@ //! ``` #![forbid(unsafe_code)] +#![deny(missing_docs)] use std::{error::Error, fmt::Display}; @@ -59,9 +60,12 @@ impl<'a> TryFrom<&'a str> for Ssid<'a> { } } +/// SSID validation error. #[derive(Debug, PartialEq, Eq)] pub enum ValidateSsidError { + /// SSID is too short. TooShort, + /// SSID is too long. TooLong, } @@ -111,10 +115,14 @@ impl Display for Passphrase<'_> { } } +/// Passphrase validation error. #[derive(Debug, PartialEq, Eq)] pub enum ValidatePassphraseError { + /// Passphrase is too short. TooShort, + /// Passphrase is too long. TooLong, + /// Passphrase contains a invalid byte. InvalidByte, } -- cgit v1.2.3