Skip to content
Merged
Changes from 2 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
12 changes: 6 additions & 6 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
Comment thread
T0mstone marked this conversation as resolved.
//! 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
Comment thread
T0mstone marked this conversation as resolved.
/// message.
pub fn get(&self, modifs: ModifierSet<&str>) -> Option<(&'static str, Option<&str>)> {
match self {
Expand All @@ -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)`.
Comment thread
T0mstone marked this conversation as resolved.
Outdated
pub fn variants(
Expand Down