Skip to content

Commit 9f0a7eb

Browse files
committed
Make some stuff public so that they can be reused by other tools
1 parent 530a35f commit 9f0a7eb

File tree

6 files changed

+7
-10
lines changed

6 files changed

+7
-10
lines changed

crates/ra_ide/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,10 @@ impl AnalysisHost {
176176
pub fn request_cancellation(&mut self) {
177177
self.db.request_cancellation();
178178
}
179-
pub fn raw_database(
180-
&self,
181-
) -> &(impl hir::db::HirDatabase + salsa::Database + ra_db::SourceDatabaseExt) {
179+
pub fn raw_database(&self) -> &RootDatabase {
182180
&self.db
183181
}
184-
pub fn raw_database_mut(
185-
&mut self,
186-
) -> &mut (impl hir::db::HirDatabase + salsa::Database + ra_db::SourceDatabaseExt) {
182+
pub fn raw_database_mut(&mut self) -> &mut RootDatabase {
187183
&mut self.db
188184
}
189185
}

crates/ra_project_model/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub enum ProjectWorkspace {
3535
/// `PackageRoot` describes a package root folder.
3636
/// Which may be an external dependency, or a member of
3737
/// the current workspace.
38-
#[derive(Clone)]
38+
#[derive(Debug, Clone)]
3939
pub struct PackageRoot {
4040
/// Path to the root folder
4141
path: PathBuf,

crates/ra_text_edit/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct TextEdit {
2121
indels: Vec<Indel>,
2222
}
2323

24-
#[derive(Debug, Default)]
24+
#[derive(Debug, Default, Clone)]
2525
pub struct TextEditBuilder {
2626
indels: Vec<Indel>,
2727
}

crates/rust-analyzer/src/cli.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use ra_syntax::{AstNode, SourceFile};
1616
pub use analysis_bench::{analysis_bench, BenchWhat, Position};
1717
pub use analysis_stats::analysis_stats;
1818
pub use diagnostics::diagnostics;
19+
pub use load_cargo::load_cargo;
1920

2021
#[derive(Clone, Copy)]
2122
pub enum Verbosity {

crates/rust-analyzer/src/cli/load_cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn vfs_root_to_id(r: ra_vfs::VfsRoot) -> SourceRootId {
2222
SourceRootId(r.0)
2323
}
2424

25-
pub(crate) fn load_cargo(
25+
pub fn load_cargo(
2626
root: &Path,
2727
load_out_dirs_from_check: bool,
2828
with_proc_macro: bool,

editors/code/src/commands/ssr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function ssr(ctx: Ctx): Cmd {
1111

1212
const options: vscode.InputBoxOptions = {
1313
value: "() ==>> ()",
14-
prompt: "EnteR request, for example 'Foo($a:expr) ==> Foo::new($a)' ",
14+
prompt: "Enter request, for example 'Foo($a:expr) ==> Foo::new($a)' ",
1515
validateInput: async (x: string) => {
1616
try {
1717
await client.sendRequest(ra.ssr, { query: x, parseOnly: true });

0 commit comments

Comments
 (0)