Skip to content

Commit 5ce0fc2

Browse files
eyalsatorieyalleshem
authored andcommitted
Prepare tokenizer for using borrowed strings instead of allocations.
Key points for this commit: - The peekable trait isn't sufficient for using string slices, as we need the byte indexes (start/end) to create string slices, so added the current byte position to the State struct (Note: in the long term we could potentially remove peekable and use only the current position as an iterator) - Created internal functions that create slices from the original query instead of allocating strings, then converted these functions to return String to maintain compatibility (the idea is to make a small, reviewable commit without changing the Token struct or the parser)
1 parent 075e2f0 commit 5ce0fc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ast/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2789,7 +2789,7 @@ impl fmt::Display for Declare {
27892789
}
27902790

27912791
/// Sql options of a `CREATE TABLE` statement.
2792-
#[derive(Debug, Default, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
2792+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, Default)]
27932793
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27942794
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
27952795
pub enum CreateTableOptions {

0 commit comments

Comments
 (0)