Skip to content

Commit c67d1e3

Browse files
committed
fix: cargo lint wrong
1 parent 1c750d3 commit c67d1e3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

crates/rspack_binding_values/src/compilation/dependency.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ impl DependencyDTO {
1515
}
1616
}
1717

18-
fn dependency<'a>(&self, module_graph: &'a ModuleGraph) -> &'a Box<dyn Dependency> {
18+
fn dependency<'a>(&self, module_graph: &'a ModuleGraph) -> &'a dyn Dependency {
1919
module_graph
2020
.dependency_by_id(&self.dependency_id)
2121
.unwrap_or_else(|| panic!("Failed to get dependency by id = {:?}", &self.dependency_id))
22+
.as_ref()
2223
}
2324

2425
fn module_dependency<'a>(
2526
&self,
2627
module_graph: &'a ModuleGraph,
2728
) -> Option<&'a dyn ModuleDependency> {
28-
self.dependency(&module_graph).as_module_dependency()
29+
self.dependency(module_graph).as_module_dependency()
2930
}
3031
}
3132

crates/rspack_binding_values/src/module.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl ModuleDTO {
8282
}
8383
}
8484

85-
fn module(&self) -> &Box<dyn Module> {
85+
fn module(&self) -> &dyn Module {
8686
self
8787
.compilation
8888
.module_by_identifier(&self.module_id)
@@ -92,6 +92,7 @@ impl ModuleDTO {
9292
self.module_id
9393
)
9494
})
95+
.as_ref()
9596
}
9697
}
9798

0 commit comments

Comments
 (0)