Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ambiguousname committed Oct 29, 2024
1 parent dc09218 commit 00c5501
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tool/src/demo_gen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
//! Designed to work in conjunction with the JS backend.
//!
//! See docs/demo_gen.md for more.
use std::{collections::{BTreeSet, HashMap}, fmt::Write};
use std::{
collections::{BTreeSet, HashMap},
fmt::Write,
};

use askama::{self, Template};
use diplomat_core::hir::{BackendAttrSupport, TypeContext};
Expand Down
4 changes: 2 additions & 2 deletions tool/src/demo_gen/terminus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub(super) struct RenderTerminusContext<'ctx, 'tcx> {
pub terminus_info: TerminusInfo,

/// To avoid similar parameter names while we're collecting [`OutParam`]s.
pub out_param_collision : HashMap<String, i32>,
pub out_param_collision: HashMap<String, i32>,

pub relative_import_path: String,
pub module_name: String,
Expand Down Expand Up @@ -242,7 +242,7 @@ impl<'ctx, 'tcx> RenderTerminusContext<'ctx, 'tcx> {
let (p, n) = if self.out_param_collision.contains_key(&param_name) {
let n = self.out_param_collision.get(&param_name).unwrap();

(format!("{param_name}_{n}"), n+1)
(format!("{param_name}_{n}"), n + 1)
} else {
(param_name.clone(), 1)
};
Expand Down

0 comments on commit 00c5501

Please sign in to comment.