summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/model/symbol.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/model/symbol.rs b/src/model/symbol.rs
index ac1d2b10..686f1b81 100644
--- a/src/model/symbol.rs
+++ b/src/model/symbol.rs
@@ -81,12 +81,12 @@ impl Symbol {
}
/// The characters that are covered by this symbol.
- pub fn chars(&self) -> impl Iterator<Item = char> {
+ pub fn variants(&self) -> impl Iterator<Item = (&str, char)> {
let (first, slice) = match self.repr {
- Repr::Single(c) => (Some(c), [].as_slice()),
+ Repr::Single(c) => (Some(("", c)), [].as_slice()),
Repr::List(list) => (None, list),
};
- first.into_iter().chain(slice.iter().map(|&(_, c)| c))
+ first.into_iter().chain(slice.iter().copied())
}
/// Possible modifiers.