5191: Minor r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-07-02 14:10:13 +00:00 committed by GitHub
commit 83f3cdca4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 22 deletions

View File

@ -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,
@ -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>;

View File

@ -27,9 +27,7 @@ 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
if self.config.linked_projects.is_empty() && self.config.notifications.cargo_toml_not_found
{
self.show_message(
lsp_types::MessageType::Error,
@ -37,6 +35,7 @@ impl GlobalState {
);
};
let workspaces = {
self.config
.linked_projects
.iter()