Closed dmarcuse closed 4 years ago
Sorry for the slow reply, my computer was out of commission for a while. I totally forgot about pretty-printing debug formatting but it's something I'd definitely like to see in the library. I'd prefer to continue using <>
as a separator to keep it consistent with the standard debug representation. It shouldn't be too difficult to just manually print it line by line, with something like write!(f, "{:?} <> {:?},", left, right)
for each (left, right)
pair.
I've implemented this in #14.
Closed by #14.
When formatting a bimap using the debug formatter, the alternate flag (
:#?
instead of:?
) isn't considered, and the output is still written as one long line. I'm happy to write a PR to implement this, but there's one minor consideration first -std
provides aDebugMap
helper to automatically handle indentation consistently, but using it would mean that the output is generated with:
separating keys and values, as opposed to<>
. Any thoughts?