From 06da729caa3f8f0eb8f86e34ea1b6ea6f140e702 Mon Sep 17 00:00:00 2001 From: psteinroe Date: Wed, 11 Dec 2024 09:14:19 +0100 Subject: [PATCH] fix build --- crates/pg_syntax/src/statement_parser.rs | 2 +- crates/pg_workspace_new/src/workspace/server/change.rs | 1 + crates/pg_workspace_new/src/workspace/server/document.rs | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/pg_syntax/src/statement_parser.rs b/crates/pg_syntax/src/statement_parser.rs index 5efb78ae..40fcd641 100644 --- a/crates/pg_syntax/src/statement_parser.rs +++ b/crates/pg_syntax/src/statement_parser.rs @@ -72,7 +72,7 @@ impl<'p> StatementParser<'p> { if !self.node_is_open(&node_idx) { // open all nodes from `self.current_node` to the target node `node_idx` - let mut ancestors = self.ancestors(Some(node_idx)); + let ancestors = self.ancestors(Some(node_idx)); let mut nodes_to_open = Vec::>::new(); // including the target node itself nodes_to_open.push(node_idx); diff --git a/crates/pg_workspace_new/src/workspace/server/change.rs b/crates/pg_workspace_new/src/workspace/server/change.rs index f25aa0a4..f925b590 100644 --- a/crates/pg_workspace_new/src/workspace/server/change.rs +++ b/crates/pg_workspace_new/src/workspace/server/change.rs @@ -31,6 +31,7 @@ impl ChangedStatement { } impl StatementChange { + #[allow(dead_code)] pub fn statement_ref(&self) -> &StatementRef { match self { StatementChange::Added(stmt) => &stmt.ref_, diff --git a/crates/pg_workspace_new/src/workspace/server/document.rs b/crates/pg_workspace_new/src/workspace/server/document.rs index f07f972a..044110a1 100644 --- a/crates/pg_workspace_new/src/workspace/server/document.rs +++ b/crates/pg_workspace_new/src/workspace/server/document.rs @@ -62,6 +62,7 @@ impl Document { } } + #[allow(dead_code)] pub fn get_statements(&self) -> &[StatementPosition] { &self.statements } @@ -73,6 +74,7 @@ impl Document { .collect() } + #[allow(dead_code)] /// Returns the statement ref at the given offset pub fn statement_ref_at_offset(&self, offset: &TextSize) -> Option { self.statements.iter().find_map(|r| { @@ -84,6 +86,7 @@ impl Document { }) } + #[allow(dead_code)] /// Returns the statement refs at the given range pub fn statement_refs_at_range(&self, range: &TextRange) -> Vec { self.statements @@ -95,6 +98,7 @@ impl Document { .collect() } + #[allow(dead_code)] /// Returns the statement at the given offset pub fn statement_at_offset(&self, offset: &TextSize) -> Option { self.statements.iter().find_map(|r| { @@ -106,6 +110,7 @@ impl Document { }) } + #[allow(dead_code)] /// Returns the statements at the given range pub fn statements_at_range(&self, range: &TextRange) -> Vec { self.statements