Skip to content

Commit

Permalink
Clippy fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
adetaylor committed Apr 1, 2022
1 parent da2f776 commit 9f3bf7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion engine/src/conversion/analysis/fun/subclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ pub(super) fn create_subclass_destructor(
synthetic_cpp: None,
provenance: Provenance::SynthesizedOther,
});
let cpp_name = format!("{}_destructor", sub.cpp().get_final_item().to_string());
let cpp_name = format!("{}_destructor", sub.cpp().get_final_item());
let subclass_destructor_name =
ApiName::new_with_cpp_name(&Namespace::new(), subclass_destructor_name, Some(cpp_name));
(maybe_wrap, subclass_destructor_name)
Expand Down
6 changes: 2 additions & 4 deletions engine/src/conversion/analysis/make_unique.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@ pub(crate) fn add_make_uniques(apis: ApiVec<FnPhase>) -> ApiVec<AnnotatedFnPhase
apis,
&mut results,
|name, fun, analysis| {
let requires_make_unique = match analysis.kind {
let requires_make_unique = matches!(analysis.kind,
FnKind::Method {
method_kind: MethodKind::Constructor { .. },
ref impl_for,
..
} if types_with_destructors.contains(impl_for) => true,
_ => false,
};
} if types_with_destructors.contains(impl_for));
Ok(Box::new(std::iter::once(Api::Function {
name,
fun,
Expand Down

0 comments on commit 9f3bf7e

Please sign in to comment.