Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion crates/automata/src/nfa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl PartialEq for NFAState<'_> {

impl PartialOrd for NFAState<'_> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Some(self.state_id.cmp(&other.state_id))
Some(self.cmp(other))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ pub fn init_tokens(tokens: &mut [Token]) {
for i in 0..tokens.len() - 1 {
match &tokens[i].kind {
TokenKind::KEYWORD(k) if k == "FORMAT" => {
if let Some(j) = next_token_index(tokens, i) {
if tokens[j].kind == TokenKind::KEYWORD("JSON".to_string()) {
tokens[i].kind = TokenKind::KEYWORD("FORMAT_LA".to_string());
}
if let Some(j) = next_token_index(tokens, i)
&& tokens[j].kind == TokenKind::KEYWORD("JSON".to_string())
{
tokens[i].kind = TokenKind::KEYWORD("FORMAT_LA".to_string());
}
}
TokenKind::KEYWORD(k) if k == "NOT" => {
Expand Down
2 changes: 1 addition & 1 deletion crates/postgresql-cst-parser/src/cst/lr_parse_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl<'a> LRParseState<'a> {
matches!(self.extras.last(), Some(e) if e.end_byte_pos != self.token.start_byte_pos && e.kind == SyntaxKind::C_COMMENT)
}

pub(crate) fn previous_extra(&self) -> Option<&Extra> {
pub(crate) fn previous_extra(&self) -> Option<&Extra<'_>> {
let last_extra = self.extras.last()?;

let stack_end_byte_pos = self
Expand Down
2 changes: 1 addition & 1 deletion crates/postgresql-cst-parser/src/tree_sitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl Tree {
}
}

pub fn root_node(&self) -> Node {
pub fn root_node(&self) -> Node<'_> {
Node {
input: &self.src,
range_map: Rc::clone(&self.range_map),
Expand Down