From 9cd3e55a51d6b1d066ed22f7732666bbe4e39688 Mon Sep 17 00:00:00 2001 From: crowlkats Date: Wed, 25 Oct 2023 12:55:48 +0200 Subject: [PATCH] fix --- src/html/type.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/html/type.rs b/src/html/type.rs index 3fd2a3ae..1a2f8408 100644 --- a/src/html/type.rs +++ b/src/html/type.rs @@ -112,8 +112,8 @@ pub fn render_type_def(def: &crate::ts_type::TsTypeDef) -> String { TsTypeDefKind::Mapped => { let mapped = def.mapped_type.as_ref().unwrap(); - let optional = if let Some(optional) = mapped.readonly { - let char = match optional { + let readonly = if let Some(readonly) = mapped.readonly { + let char = match readonly { TruePlusMinus::True => "", TruePlusMinus::Plus => "+", TruePlusMinus::Minus => "-", @@ -151,7 +151,7 @@ pub fn render_type_def(def: &crate::ts_type::TsTypeDef) -> String { .unwrap_or_default(); format!( - "{optional}[{}{name_type}]{optional}{ts_type}", + "{readonly}[{}{name_type}]{optional}{ts_type}", type_param_summary(&mapped.type_param, "in") ) }