Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some stuff public so that they can be reused by other tools #4405

Merged
merged 1 commit into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions crates/ra_ide/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,10 @@ impl AnalysisHost {
pub fn request_cancellation(&mut self) {
self.db.request_cancellation();
}
pub fn raw_database(
&self,
) -> &(impl hir::db::HirDatabase + salsa::Database + ra_db::SourceDatabaseExt) {
pub fn raw_database(&self) -> &RootDatabase {
&self.db
}
pub fn raw_database_mut(
&mut self,
) -> &mut (impl hir::db::HirDatabase + salsa::Database + ra_db::SourceDatabaseExt) {
pub fn raw_database_mut(&mut self) -> &mut RootDatabase {
&mut self.db
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_project_model/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub enum ProjectWorkspace {
/// `PackageRoot` describes a package root folder.
/// Which may be an external dependency, or a member of
/// the current workspace.
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct PackageRoot {
/// Path to the root folder
path: PathBuf,
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_text_edit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct TextEdit {
indels: Vec<Indel>,
}

#[derive(Debug, Default)]
#[derive(Debug, Default, Clone)]
pub struct TextEditBuilder {
indels: Vec<Indel>,
}
Expand Down
1 change: 1 addition & 0 deletions crates/rust-analyzer/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use ra_syntax::{AstNode, SourceFile};
pub use analysis_bench::{analysis_bench, BenchWhat, Position};
pub use analysis_stats::analysis_stats;
pub use diagnostics::diagnostics;
pub use load_cargo::load_cargo;

#[derive(Clone, Copy)]
pub enum Verbosity {
Expand Down
2 changes: 1 addition & 1 deletion crates/rust-analyzer/src/cli/load_cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn vfs_root_to_id(r: ra_vfs::VfsRoot) -> SourceRootId {
SourceRootId(r.0)
}

pub(crate) fn load_cargo(
pub fn load_cargo(
root: &Path,
load_out_dirs_from_check: bool,
with_proc_macro: bool,
Expand Down
2 changes: 1 addition & 1 deletion editors/code/src/commands/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function ssr(ctx: Ctx): Cmd {

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