From 00c5501015b5d1848abf60f8751a5bde07a16bca Mon Sep 17 00:00:00 2001 From: Tyler K Date: Tue, 29 Oct 2024 12:49:15 -0700 Subject: [PATCH] Formatting --- tool/src/demo_gen/mod.rs | 5 ++++- tool/src/demo_gen/terminus.rs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tool/src/demo_gen/mod.rs b/tool/src/demo_gen/mod.rs index 2d7c31c10..2f21dc40e 100644 --- a/tool/src/demo_gen/mod.rs +++ b/tool/src/demo_gen/mod.rs @@ -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}; diff --git a/tool/src/demo_gen/terminus.rs b/tool/src/demo_gen/terminus.rs index d0cd6396e..65352fb8d 100644 --- a/tool/src/demo_gen/terminus.rs +++ b/tool/src/demo_gen/terminus.rs @@ -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, + pub out_param_collision: HashMap, pub relative_import_path: String, pub module_name: String, @@ -242,7 +242,7 @@ impl<'ctx, 'tcx> RenderTerminusContext<'ctx, 'tcx> { let (p, n) = if self.out_param_collision.contains_key(¶m_name) { let n = self.out_param_collision.get(¶m_name).unwrap(); - (format!("{param_name}_{n}"), n+1) + (format!("{param_name}_{n}"), n + 1) } else { (param_name.clone(), 1) };