Merge pull request #1017 from jonathandturner/better_duration

improve duration print
This commit is contained in:
Jonathan Turner 2019-11-27 15:32:17 +13:00 committed by GitHub
commit b443a2d713
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -339,7 +339,7 @@ impl PrettyDebug for FormatInlineShape {
}),
InlineShape::Date(date) => b::primitive(date.humanize()),
InlineShape::Duration(duration) => {
(b::kind("duration") + b::space() + b::primitive(duration)).group()
b::description(Primitive::Duration(*duration).format(None))
}
InlineShape::Path(path) => b::primitive(path.display()),
InlineShape::Binary => b::opaque("<binary>"),