Skip to content
Merged

Minor #5191

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions crates/ra_project_model/src/cargo_workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl ops::Index<Target> for CargoWorkspace {
}
}

#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(Default, Clone, Debug, PartialEq, Eq)]
pub struct CargoConfig {
/// Do not activate the `default` feature.
pub no_default_features: bool,
Expand All @@ -64,18 +64,6 @@ pub struct CargoConfig {
pub target: Option<String>,
}

impl Default for CargoConfig {
fn default() -> Self {
CargoConfig {
no_default_features: false,
all_features: false,
features: Vec::new(),
load_out_dirs_from_check: false,
target: None,
}
}
}

pub type Package = Idx<PackageData>;

pub type Target = Idx<TargetData>;
Expand Down
17 changes: 8 additions & 9 deletions crates/rust-analyzer/src/reload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,15 @@ impl GlobalState {
}
pub(crate) fn reload(&mut self) {
log::info!("reloading projects: {:?}", self.config.linked_projects);
let workspaces = {
if self.config.linked_projects.is_empty()
&& self.config.notifications.cargo_toml_not_found
{
self.show_message(
lsp_types::MessageType::Error,
"rust-analyzer failed to discover workspace".to_string(),
);
};
if self.config.linked_projects.is_empty() && self.config.notifications.cargo_toml_not_found
{
self.show_message(
lsp_types::MessageType::Error,
"rust-analyzer failed to discover workspace".to_string(),
);
};

let workspaces = {
self.config
.linked_projects
.iter()
Expand Down