From 387826ba37c0e41119c4f50e70a783446ea59067 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Tue, 19 Jan 2016 19:48:28 -0800 Subject: [PATCH] Fix option printing --- src/dfmt/main.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dfmt/main.d b/src/dfmt/main.d index afa75e4..b8b0aee 100644 --- a/src/dfmt/main.d +++ b/src/dfmt/main.d @@ -184,12 +184,14 @@ else private string optionsToString(E)() if (is(E == enum)) { import std.traits : EnumMembers; - import std.conv; + import std.conv : to; string result = "["; foreach (i, option; EnumMembers!E) { - result ~= to!string(option) ~ "|"; + immutable s = to!string(option); + if (s != "unspecified") + result ~= s ~ "|"; } result = result[0 .. $ - 1] ~ "]"; return result;