Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ambiguousname committed Nov 7, 2024
1 parent 4d814df commit eb6bc9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tool/src/demo_gen/terminus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ impl<'ctx, 'tcx> RenderTerminusContext<'ctx, 'tcx> {
);
fields.push(
self.formatter
.fmt_param_name(&field.name.to_string())
.fmt_param_name(field.name.as_ref())
.into(),
);
}
Expand Down
5 changes: 1 addition & 4 deletions tool/src/js/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,7 @@ impl<'ctx, 'tcx> TyGenContext<'ctx, 'tcx> {

let js_type_name = self.gen_js_type_str(&field.ty);

let is_option = match &field.ty {
hir::Type::DiplomatOption(..) => true,
_ => false
};
let is_option = matches!(&field.ty, hir::Type::DiplomatOption(..));

let c_to_js_deref = self.gen_c_to_js_deref_for_type(&field.ty, "ptr".into(), struct_field_info.fields[i].offset);

Expand Down

0 comments on commit eb6bc9d

Please sign in to comment.