From 8318354c5772a6d29a47166f63e505f90960ed55 Mon Sep 17 00:00:00 2001 From: T0mstone Date: Thu, 3 Jul 2025 23:50:06 +0200 Subject: [PATCH 1/4] Fix docs --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0c11a5a..bb0dd60 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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,7 +79,7 @@ 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)`. pub fn variants( From 17d5f54ad99c20746a889bff3ef7eeb787a2d850 Mon Sep 17 00:00:00 2001 From: T0mstone Date: Thu, 3 Jul 2025 23:53:54 +0200 Subject: [PATCH 2/4] Also fix crate docs The only change is "single character" -> "string", it's just obscured by having to re-wrap the text. --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index bb0dd60..4d0f81a 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; From f77b1fccad84ad85e2c1ada3516920ebd327bb4c Mon Sep 17 00:00:00 2001 From: T0mstone Date: Fri, 4 Jul 2025 00:13:13 +0200 Subject: [PATCH 3/4] Fix oversight --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 4d0f81a..0455ae7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -81,7 +81,7 @@ impl 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>)> { From 14c1b952313f719d3722e0e3944d4200f6ae753c Mon Sep 17 00:00:00 2001 From: T0mstone Date: Fri, 4 Jul 2025 01:18:27 +0200 Subject: [PATCH 4/4] Fix assertion message --- src/shared.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }