Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {
Expand All @@ -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<Item = (ModifierSet<&str>, &'static str, Option<&str>)> {
Expand Down
2 changes: 1 addition & 1 deletion src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl<S: Deref<Target = str>> ModifierSet<S> {
// 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)
}
Expand Down