diff --git a/src/lib.rs b/src/lib.rs index 0c11a5a..0455ae7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,10 +2,10 @@ //! //! ## Model //! A [`Symbol`] is a collection of one or more _variants_. Each variant is -//! identified by a set of [_modifiers_](ModifierSet) and has a single character -//! as its value. The modifiers themselves can in principle be any non-empty -//! strings that don't contain the character `.`, but codex only defines ones -//! that are entirely made of ASCII alphabetical characters. +//! identified by a set of [_modifiers_](ModifierSet) and has a string as its +//! value. The modifiers themselves can in principle be any non-empty strings +//! that don't contain the character `.`, but codex only defines ones that are +//! entirely made of ASCII alphabetical characters. pub use self::shared::ModifierSet; @@ -68,7 +68,7 @@ pub enum Symbol { } impl Symbol { - /// Get the symbol's character for a given set of modifiers, alongside an optional deprecation + /// Get the symbol's variant for a given set of modifiers, alongside an optional deprecation /// message. pub fn get(&self, modifs: ModifierSet<&str>) -> Option<(&'static str, Option<&str>)> { match self { @@ -79,9 +79,9 @@ impl Symbol { } } - /// The characters that are covered by this symbol. + /// Iterate over the variants of this symbol. /// - /// Each variant is represented by a tuple `(modifiers, character, deprecation)`. + /// Each variant is represented by a tuple `(modifiers, value, deprecation)`. pub fn variants( &self, ) -> impl Iterator, &'static str, Option<&str>)> { diff --git a/src/shared.rs b/src/shared.rs index cc9286e..b9bc09c 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -25,7 +25,7 @@ impl> ModifierSet { // expensive, even for debug mode. debug_assert!( !s.contains(".."), - "ModifierSet::from_dotted called with string containing empty modifier" + "ModifierSet::from_raw_dotted called with string containing empty modifier" ); Self(s) }