From a1f263862ca3c9594700f0c95a8e5798baf07ea9 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 31 Jan 2025 10:56:49 +0100 Subject: [PATCH] Change type repr to short name (#5788) --- crates/typst-library/src/foundations/ty.rs | 2 +- tests/suite/foundations/repr.typ | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/typst-library/src/foundations/ty.rs b/crates/typst-library/src/foundations/ty.rs index a2395f2a7..973c1cb61 100644 --- a/crates/typst-library/src/foundations/ty.rs +++ b/crates/typst-library/src/foundations/ty.rs @@ -136,7 +136,7 @@ impl Repr for Type { } else if *self == Type::of::() { "type(none)" } else { - self.long_name() + self.short_name() } .into() } diff --git a/tests/suite/foundations/repr.typ b/tests/suite/foundations/repr.typ index 36823e98a..2f2c055ad 100644 --- a/tests/suite/foundations/repr.typ +++ b/tests/suite/foundations/repr.typ @@ -37,8 +37,8 @@ #t(() => none, `(..) => ..`) // Types. -#t(int, `integer`) -#t(type("hi"), `string`) +#t(int, `int`) +#t(type("hi"), `str`) #t(type((a: 1)), `dictionary`) // Constants.