From 08e8b93bb6ba33ddadcd7527d378a94e1de12da3 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Fri, 26 Nov 2021 11:03:01 -0800 Subject: [PATCH] Fix formatting in the presence of a package name in TypeAnnotation::Apply --- compiler/fmt/src/annotation.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/fmt/src/annotation.rs b/compiler/fmt/src/annotation.rs index 5f6887965c..f566abc85d 100644 --- a/compiler/fmt/src/annotation.rs +++ b/compiler/fmt/src/annotation.rs @@ -277,7 +277,7 @@ impl<'a> Formattable<'a> for TypeAnnotation<'a> { buf.push(')') } } - Apply(_, name, arguments) => { + Apply(pkg, name, arguments) => { // NOTE apply is never multiline let write_parens = parens == Parens::InApply && !arguments.is_empty(); @@ -285,6 +285,11 @@ impl<'a> Formattable<'a> for TypeAnnotation<'a> { buf.push('(') } + if !pkg.is_empty() { + buf.push_str(pkg); + buf.push('.'); + } + buf.push_str(name); for argument in *arguments {