Skip to content

Commit 06da729

Browse files
committed
fix build
1 parent 14209ef commit 06da729

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

crates/pg_syntax/src/statement_parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl<'p> StatementParser<'p> {
7272

7373
if !self.node_is_open(&node_idx) {
7474
// open all nodes from `self.current_node` to the target node `node_idx`
75-
let mut ancestors = self.ancestors(Some(node_idx));
75+
let ancestors = self.ancestors(Some(node_idx));
7676
let mut nodes_to_open = Vec::<NodeIndex<DefaultIx>>::new();
7777
// including the target node itself
7878
nodes_to_open.push(node_idx);

crates/pg_workspace_new/src/workspace/server/change.rs

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ impl ChangedStatement {
3131
}
3232

3333
impl StatementChange {
34+
#[allow(dead_code)]
3435
pub fn statement_ref(&self) -> &StatementRef {
3536
match self {
3637
StatementChange::Added(stmt) => &stmt.ref_,

crates/pg_workspace_new/src/workspace/server/document.rs

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ impl Document {
6262
}
6363
}
6464

65+
#[allow(dead_code)]
6566
pub fn get_statements(&self) -> &[StatementPosition] {
6667
&self.statements
6768
}
@@ -73,6 +74,7 @@ impl Document {
7374
.collect()
7475
}
7576

77+
#[allow(dead_code)]
7678
/// Returns the statement ref at the given offset
7779
pub fn statement_ref_at_offset(&self, offset: &TextSize) -> Option<StatementRef> {
7880
self.statements.iter().find_map(|r| {
@@ -84,6 +86,7 @@ impl Document {
8486
})
8587
}
8688

89+
#[allow(dead_code)]
8790
/// Returns the statement refs at the given range
8891
pub fn statement_refs_at_range(&self, range: &TextRange) -> Vec<StatementRef> {
8992
self.statements
@@ -95,6 +98,7 @@ impl Document {
9598
.collect()
9699
}
97100

101+
#[allow(dead_code)]
98102
/// Returns the statement at the given offset
99103
pub fn statement_at_offset(&self, offset: &TextSize) -> Option<Statement> {
100104
self.statements.iter().find_map(|r| {
@@ -106,6 +110,7 @@ impl Document {
106110
})
107111
}
108112

113+
#[allow(dead_code)]
109114
/// Returns the statements at the given range
110115
pub fn statements_at_range(&self, range: &TextRange) -> Vec<Statement> {
111116
self.statements

0 commit comments

Comments
 (0)