a lot of clippy::style fixes

This commit is contained in:
Matthias Krüger 2021-03-21 15:33:18 +01:00
parent ae7e55c1dd
commit 202b51bc7b
19 changed files with 52 additions and 69 deletions

View file

@ -242,11 +242,8 @@ impl GlobalState {
}
BuildDataProgress::End(collector) => {
self.fetch_build_data_completed();
let workspaces = (*self.workspaces)
.clone()
.into_iter()
.map(|it| Ok(it))
.collect();
let workspaces =
(*self.workspaces).clone().into_iter().map(Ok).collect();
self.switch_workspaces(workspaces, Some(collector));
(Some(Progress::End), None)
}

View file

@ -237,7 +237,7 @@ impl GlobalState {
None => None,
};
if &*self.workspaces == &workspaces && self.workspace_build_data == workspace_build_data {
if *self.workspaces == workspaces && self.workspace_build_data == workspace_build_data {
return;
}

View file

@ -54,7 +54,7 @@ impl<'a> Project<'a> {
}
pub(crate) fn server(self) -> Server {
let tmp_dir = self.tmp_dir.unwrap_or_else(|| TestDir::new());
let tmp_dir = self.tmp_dir.unwrap_or_else(TestDir::new);
static INIT: Once = Once::new();
INIT.call_once(|| {
env_logger::builder().is_test(true).parse_env("RA_LOG").try_init().unwrap();