Skip to content

Commit e8a67b6

Browse files
committed
internal: prepare to use standard .run pattern for subcommands
1 parent 0d2b423 commit e8a67b6

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

crates/rust-analyzer/src/bin/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Driver for rust-analyzer.
22
//!
33
//! Based on cli flags, either spawns an LSP server, or runs a batch analysis
4-
mod flags;
54
mod logger;
65
mod rustc_wrapper;
76

@@ -10,7 +9,7 @@ use std::{convert::TryFrom, env, fs, path::Path, process};
109
use lsp_server::Connection;
1110
use project_model::ProjectManifest;
1211
use rust_analyzer::{
13-
cli::{self, AnalysisStatsCmd},
12+
cli::{self, flags, AnalysisStatsCmd},
1413
config::Config,
1514
from_json,
1615
lsp_ext::supports_utf8,

crates/rust-analyzer/src/cli.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Various batch processing tasks, intended primarily for debugging.
22
3+
pub mod flags;
34
pub mod load_cargo;
45
mod analysis_stats;
56
mod diagnostics;

crates/rust-analyzer/src/bin/flags.rs renamed to crates/rust-analyzer/src/cli/flags.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
use std::path::PathBuf;
44

55
use ide_ssr::{SsrPattern, SsrRule};
6-
use rust_analyzer::cli::Verbosity;
6+
7+
use crate::cli::Verbosity;
78

89
xflags::xflags! {
910
src "./src/bin/flags.rs"
@@ -196,7 +197,7 @@ impl RustAnalyzer {
196197
// generated end
197198

198199
impl RustAnalyzer {
199-
pub(crate) fn verbosity(&self) -> Verbosity {
200+
pub fn verbosity(&self) -> Verbosity {
200201
if self.quiet {
201202
return Verbosity::Quiet;
202203
}

0 commit comments

Comments
 (0)