Skip to content

Commit 037b36a

Browse files
authored
refact: refactor type declarations and drop custom types (#32)
1 parent b940e04 commit 037b36a

10 files changed

Lines changed: 163 additions & 445 deletions

src/arena.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ impl StringArena {
3939
self.cache.get(&self.hasher.hash_one(value)).copied()
4040
}
4141

42-
/// Like ['str_ref'] but case-insensitive
43-
pub fn str_ref_no_case(&self, value: &str) -> Option<StrRef> {
44-
self.cache
45-
.get(&self.hasher.hash_one(Ascii::new(value)))
46-
.copied()
47-
}
48-
4942
/// Interns a string using case-insensitive hashing.
5043
///
5144
/// Two strings that differ only in ASCII case will resolve to the same [`StrRef`].
@@ -67,11 +60,6 @@ impl StringArena {
6760
pub fn get(&self, key: StrRef) -> &str {
6861
&self.slots[key.0]
6962
}
70-
71-
/// Compares two interned strings for case-insensitive ASCII equality.
72-
pub fn eq_ignore_ascii_case(&self, ka: StrRef, kb: StrRef) -> bool {
73-
self.get(ka).eq_ignore_ascii_case(self.get(kb))
74-
}
7563
}
7664

7765
/// An expression node stored in the [`ExprArena`].

src/error.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,9 @@ pub enum AnalysisError {
199199
#[error("{0}:{1}: expected a record")]
200200
ExpectRecordLiteral(u32, u32),
201201

202-
/// When a custom type (meaning a type not supported by EventQL by default) is used but
203-
/// not registered in the `AnalysisOptions` custom type set.
204-
#[error("{0}:{1}: unsupported custom type '{2}'")]
205-
UnsupportedCustomType(u32, u32, String),
202+
/// When a type is not supported by EventQL.
203+
#[error("{0}:{1}: unknown type '{2}'")]
204+
UnknownType(u32, u32, String),
206205

207206
/// A function was called with the wrong number of arguments.
208207
///

0 commit comments

Comments
 (0)