Closed fritzrehde closed 10 months ago
In parse-display
, just like in std::fmt::format
, {
and }
must be expressed as {{
and }}
.
So, it should be written as follows.
#[derive(FromStr, Debug)]
#[display("{{{a},{b}}}")]
struct Ratingss {
a: usize,
b: usize,
}
Ah thanks, I didn't know that about the syntax to print {
und }
in std::fmt::format
.
Suppose I would like to use:
to parse from the string
"{42,100}"
. This leads to an invalid display format. Is this a bug, or not allowed/not implemented?