Skip to content

Commit 93afa4b

Browse files
committed
fix: async within sync
1 parent 8a0b09a commit 93afa4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+279
-238
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/pg_base_db/src/document.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ impl Document {
162162
#[cfg(test)]
163163
mod tests {
164164

165-
use text_size::{TextRange, TextSize};
166165
use pg_fs::PgLspPath;
166+
use text_size::{TextRange, TextSize};
167167

168-
use crate::{Document};
168+
use crate::Document;
169169

170170
#[test]
171171
fn test_statements_at_range() {

crates/pg_cli/src/cli_options.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::logging::LoggingKind;
22
use crate::LoggingLevel;
3+
use bpaf::Bpaf;
34
use pg_configuration::ConfigurationPathHint;
45
use pg_diagnostics::Severity;
5-
use bpaf::Bpaf;
66
use std::fmt::{Display, Formatter};
77
use std::path::PathBuf;
88
use std::str::FromStr;
@@ -127,7 +127,6 @@ pub enum CliReporter {
127127
Junit,
128128
/// Reports linter diagnostics using the [GitLab Code Quality report](https://docs.gitlab.com/ee/ci/testing/code_quality.html#implement-a-custom-tool).
129129
GitLab,
130-
131130
}
132131

133132
impl CliReporter {
@@ -229,4 +228,3 @@ impl From<MaxDiagnostics> for u32 {
229228
}
230229
}
231230
}
232-

crates/pg_cli/src/commands/clean.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ pub fn clean(_cli_session: CliSession) -> Result<(), CliDiagnostic> {
1313
remove_dir_all(logs_path.clone()).and_then(|_| create_dir(logs_path))?;
1414
Ok(())
1515
}
16-

crates/pg_cli/src/commands/daemon.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,4 +277,3 @@ impl<S> Filter<S> for LoggingFilter {
277277
Some(SELF_FILTER)
278278
}
279279
}
280-

crates/pg_cli/src/commands/init.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ Welcome to the Postgres Language Server! Let's get you started...
2020
});
2121
Ok(())
2222
}
23-

crates/pg_cli/src/commands/mod.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ use crate::logging::LoggingKind;
44
use crate::{
55
execute_mode, setup_cli_subscriber, CliDiagnostic, CliSession, Execution, LoggingLevel, VERSION,
66
};
7-
use pg_configuration::{PartialConfiguration};
7+
use bpaf::Bpaf;
8+
use pg_configuration::PartialConfiguration;
89
use pg_console::{markup, Console, ConsoleExt};
910
use pg_diagnostics::{Diagnostic, PrintDiagnostic};
1011
use pg_fs::FileSystem;
11-
use pg_workspace_new::configuration::{
12-
load_configuration, LoadedConfiguration,
13-
};
12+
use pg_workspace_new::configuration::{load_configuration, LoadedConfiguration};
1413
use pg_workspace_new::settings::PartialConfigurationExt;
1514
use pg_workspace_new::workspace::UpdateSettingsParams;
1615
use pg_workspace_new::{DynRef, Workspace, WorkspaceError};
17-
use bpaf::Bpaf;
1816
use std::ffi::OsString;
1917
use std::path::PathBuf;
2018

@@ -169,7 +167,6 @@ impl PgLspCommand {
169167
}
170168
}
171169

172-
173170
pub const fn should_use_server(&self) -> bool {
174171
match self.cli_options() {
175172
Some(cli_options) => cli_options.use_server,
@@ -301,7 +298,7 @@ pub(crate) trait CommandRunner: Sized {
301298
workspace_directory: fs.working_directory(),
302299
configuration,
303300
vcs_base_path,
304-
gitignore_matches
301+
gitignore_matches,
305302
})?;
306303

307304
let execution = self.get_execution(cli_options, console, workspace)?;
@@ -366,4 +363,3 @@ mod tests {
366363
pg_lsp_command().check_invariants(false);
367364
}
368365
}
369-

crates/pg_cli/src/commands/version.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ impl fmt::Display for DisplayServerVersion<'_> {
4040
}
4141
}
4242
}
43-

crates/pg_cli/src/diagnostics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,4 +500,3 @@ mod test {
500500
)
501501
}
502502
}
503-

crates/pg_cli/src/execute/diagnostics.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
use pg_diagnostics::adapters::{IoError, StdError};
2-
use pg_diagnostics::{
3-
Category, Diagnostic, DiagnosticExt, DiagnosticTags, Error
4-
};
2+
use pg_diagnostics::{Category, Diagnostic, DiagnosticExt, DiagnosticTags, Error};
53
use std::io;
64

75
#[derive(Debug, Diagnostic)]
@@ -72,4 +70,3 @@ impl<T> ResultIoExt for io::Result<T> {
7270
self.map_err(|error| IoError::from(error).with_file_path(file_path))
7371
}
7472
}
75-

0 commit comments

Comments
 (0)