Skip to content

Commit

Permalink
Formatting again
Browse files Browse the repository at this point in the history
  • Loading branch information
ambiguousname committed Dec 12, 2024
1 parent f5f17f0 commit 5d4000d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
18 changes: 3 additions & 15 deletions tool/src/js/converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ impl<'tcx> TyGenContext<'_, 'tcx> {
let type_name = self.formatter.fmt_type_name(opaque_id);

// Add to the import list:
self.add_import(
type_name.clone(),
None,
super::gen::ImportUsage::Both,
);
self.add_import(type_name.clone(), None, super::gen::ImportUsage::Both);

if self.tcx.resolve_type(opaque_id).attrs().disable {
self.errors
Expand All @@ -92,11 +88,7 @@ impl<'tcx> TyGenContext<'_, 'tcx> {
let type_name = self.formatter.fmt_type_name(id);

// Add to the import list:
self.add_import(
type_name.clone(),
None,
super::gen::ImportUsage::Both,
);
self.add_import(type_name.clone(), None, super::gen::ImportUsage::Both);

if self.tcx.resolve_type(id).attrs().disable {
self.errors
Expand All @@ -109,11 +101,7 @@ impl<'tcx> TyGenContext<'_, 'tcx> {
let type_name = self.formatter.fmt_type_name(enum_id);

// Add to the import list:
self.add_import(
type_name.clone(),
None,
super::gen::ImportUsage::Both,
);
self.add_import(type_name.clone(), None, super::gen::ImportUsage::Both);

if self.tcx.resolve_type(enum_id).attrs().disable {
self.errors
Expand Down
6 changes: 1 addition & 5 deletions tool/src/js/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,7 @@ pub(crate) fn run<'tcx>(
let file_name = formatter.fmt_file_name(&context.type_name, &file_type);

// Remove our self reference:
context.remove_import(
context.type_name.clone(),
None,
gen::ImportUsage::Both,
);
context.remove_import(context.type_name.clone(), None, gen::ImportUsage::Both);

// If we're a struct, remove importing our own StructType_obj definition if it exists.
if matches!(type_def, TypeDef::Struct(..)) {
Expand Down

0 comments on commit 5d4000d

Please sign in to comment.