support strings as char lists in term comparisons
This commit is contained in:
@@ -24,7 +24,8 @@ pub struct StringList {
|
||||
|
||||
impl Hash for StringList {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.borrow().hash(state)
|
||||
let h = self.borrow().hash(state);
|
||||
(h, self.cursor, self.expandable).hash(state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,11 +64,6 @@ impl StringList {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn cursor(&self) -> usize {
|
||||
self.cursor
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn head(&self) -> Option<char> {
|
||||
self.borrow()[self.cursor ..].chars().next()
|
||||
|
||||
Reference in New Issue
Block a user