mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Merge #5191
5191: Minor r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
83f3cdca4f
@ -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>;
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user