Index: src/lib.rs ================================================================== --- src/lib.rs +++ src/lib.rs @@ -1,14 +1,14 @@ //! Random phonetic password generator. //! //! # Features //! | Feature | Function //! |--------------------|---------- -//! | `filter-offensive` | Enable offensive filter. +//! | `filter-offensive` | Enable "offensive" filter. //! //! Notes: -//! - Enabling the `filter-offensive` feature enables offensive filtering in +//! - Enabling the `filter-offensive` feature enables "offensive" filtering in //! [`Generator`]s by default, but it can be disabled using //! [`Generator::filter_offensive()`]. #![cfg_attr(docsrs, feature(doc_cfg))] @@ -510,10 +510,12 @@ assert!(len > 0, "length must be greater than zero"); self.len = len; self } + /// Attempt to filter out passwords that end up being "offensive" or + /// containing "offensive" substrings. #[cfg(feature = "filter-offensive")] #[cfg_attr(docsrs, doc(cfg(feature = "filter-offensive")))] #[must_use] pub const fn filter_offensive(mut self, f: bool) -> Self { self.filter_offensive = f;