From faf407b691ee2e2306d5a3e57601de255dbdd470 Mon Sep 17 00:00:00 2001 From: Dominik Spicher Date: Mon, 22 Aug 2022 10:06:21 +0200 Subject: [PATCH] export_sdl: avoid trailing space for scalar definitions This has been introduced in 06973ee. The problem can easily be avoided by modifying the `write!` directives inside the federation if-clause to write space prefixes instead of suffixes. --- src/registry/export_sdl.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registry/export_sdl.rs b/src/registry/export_sdl.rs index d44d1473..af0524d0 100644 --- a/src/registry/export_sdl.rs +++ b/src/registry/export_sdl.rs @@ -215,14 +215,14 @@ impl Registry { if let Some(description) = description { export_description(sdl, options, true, description); } - write!(sdl, "scalar {} ", name).ok(); + write!(sdl, "scalar {}", name).ok(); if options.federation { if *inaccessible { - write!(sdl, "@inaccessible ").ok(); + write!(sdl, " @inaccessible").ok(); } for tag in *tags { - write!(sdl, "@tag(name: \"{}\") ", tag.replace('"', "\\\"")).ok(); + write!(sdl, " @tag(name: \"{}\")", tag.replace('"', "\\\"")).ok(); } } writeln!(sdl).ok();