diff --git a/crates/mun_compiler/src/driver/display_color.rs b/crates/mun_compiler/src/driver/display_color.rs index 391b2bc76..b2349b641 100644 --- a/crates/mun_compiler/src/driver/display_color.rs +++ b/crates/mun_compiler/src/driver/display_color.rs @@ -46,7 +46,7 @@ fn terminal_support_ansi() -> bool { fn cmd_supports_ansi() -> bool { // Run `ver` program to find out Windows version Command::new("cmd") - .args(&["/C", "ver"]) + .args(["/C", "ver"]) .output() .map_or(false, |output| { String::from_utf8(output.stdout).map_or(false, |windows_version| { diff --git a/crates/mun_hir/src/code_model/module.rs b/crates/mun_hir/src/code_model/module.rs index a1fe89715..73bfb5c80 100644 --- a/crates/mun_hir/src/code_model/module.rs +++ b/crates/mun_hir/src/code_model/module.rs @@ -75,7 +75,7 @@ impl Module { if let Some(file_id) = self.file_id(db) { let item_tree = db.item_tree(file_id); for diagnostics in item_tree.diagnostics.iter() { - diagnostics.add_to(db, &*item_tree, sink); + diagnostics.add_to(db, &item_tree, sink); } } diff --git a/crates/mun_hir/src/db.rs b/crates/mun_hir/src/db.rs index c0f1b4a09..dd4447d90 100644 --- a/crates/mun_hir/src/db.rs +++ b/crates/mun_hir/src/db.rs @@ -143,7 +143,7 @@ pub trait HirDatabase: DefDatabase + Upcast { fn parse_query(db: &dyn AstDatabase, file_id: FileId) -> Parse { let text = db.file_text(file_id); - SourceFile::parse(&*text) + SourceFile::parse(&text) } fn line_index_query(db: &dyn SourceDatabase, file_id: FileId) -> Arc { diff --git a/crates/mun_hir/src/expr/scope.rs b/crates/mun_hir/src/expr/scope.rs index ae3374a5c..7d9bd6733 100644 --- a/crates/mun_hir/src/expr/scope.rs +++ b/crates/mun_hir/src/expr/scope.rs @@ -42,7 +42,7 @@ pub struct ScopeData { impl ExprScopes { pub(crate) fn expr_scopes_query(db: &dyn DefDatabase, def: DefWithBodyId) -> Arc { let body = db.body(def); - Arc::new(ExprScopes::new(&*body)) + Arc::new(ExprScopes::new(&body)) } fn new(body: &Body) -> ExprScopes { diff --git a/crates/mun_hir/src/semantics.rs b/crates/mun_hir/src/semantics.rs index e3a0a65d8..e484cd955 100644 --- a/crates/mun_hir/src/semantics.rs +++ b/crates/mun_hir/src/semantics.rs @@ -106,7 +106,7 @@ impl<'db> Semantics<'db> { let mut cache = self.source_to_definition_cache.borrow_mut(); let mut context = SourceToDefContext { db: self.db, - cache: &mut *cache, + cache: &mut cache, }; f(&mut context) } diff --git a/crates/mun_language_server/src/from_lsp.rs b/crates/mun_language_server/src/from_lsp.rs index 15088bb4c..c9946e9ea 100644 --- a/crates/mun_language_server/src/from_lsp.rs +++ b/crates/mun_language_server/src/from_lsp.rs @@ -57,6 +57,6 @@ pub(crate) fn file_position( ) -> anyhow::Result { let file_id = file_id(snapshot, &text_document_position.text_document.uri)?; let line_index = snapshot.analysis.file_line_index(file_id)?; - let offset = offset(&*line_index, text_document_position.position); + let offset = offset(&line_index, text_document_position.position); Ok(FilePosition { file_id, offset }) } diff --git a/crates/mun_memory/src/gc/mark_sweep.rs b/crates/mun_memory/src/gc/mark_sweep.rs index 0baae6e1a..675fc32c2 100644 --- a/crates/mun_memory/src/gc/mark_sweep.rs +++ b/crates/mun_memory/src/gc/mark_sweep.rs @@ -285,7 +285,6 @@ where }; map_fields( - self, &mut new_allocations, &mapping.conversions, &conversion.field_mapping, @@ -320,16 +319,13 @@ where return deleted; #[allow(clippy::mutable_key_type)] - fn map_fields( - gc: &MarkSweep, + fn map_fields( new_allocations: &mut Vec>>, conversions: &HashMap, mapping: &[FieldMapping], src: NonNull, dest: NonNull, - ) where - O: Observer, - { + ) { for FieldMapping { new_ty, new_offset, @@ -366,7 +362,6 @@ where if is_same_struct { // Map in-memory struct to in-memory struct map_fields( - gc, new_allocations, conversions, &conversion.as_ref().unwrap().field_mapping, @@ -387,7 +382,6 @@ where if is_same_struct { // Map in-memory struct to heap-allocated struct map_fields( - gc, new_allocations, conversions, &conversion.as_ref().unwrap().field_mapping, @@ -398,7 +392,7 @@ where // Zero initialize heap-allocated object unsafe { std::ptr::write_bytes( - (*object).ptr, + object.ptr, 0, new_ty.layout().size(), ) @@ -456,7 +450,6 @@ where // The object still needs to be mapped // Map heap-allocated struct to in-memory struct map_fields( - gc, new_allocations, conversions, &conversion.as_ref().unwrap().field_mapping, diff --git a/crates/mun_skeptic/src/lib.rs b/crates/mun_skeptic/src/lib.rs index 271bb6aeb..e7a734cbb 100644 --- a/crates/mun_skeptic/src/lib.rs +++ b/crates/mun_skeptic/src/lib.rs @@ -155,7 +155,7 @@ fn extract_tests_from_string(markdown: &str, file_stem: &str) -> Vec { } buf.push(text.into_string()); } else if let Block::Header(ref mut buf) = block { - buf.push_str(&*text); + buf.push_str(&text); } } _ => (), diff --git a/crates/mun_syntax/src/lib.rs b/crates/mun_syntax/src/lib.rs index eaaa2acc0..b32ed49d0 100644 --- a/crates/mun_syntax/src/lib.rs +++ b/crates/mun_syntax/src/lib.rs @@ -87,7 +87,7 @@ impl Parse { } pub fn errors(&self) -> &[SyntaxError] { - &*self.errors + &self.errors } pub fn ok(self) -> Result> { diff --git a/rust-toolchain b/rust-toolchain index 8725364a8..902c74186 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.64 +1.65.0