Clarify use of format_args in Debug for Literal
This commit is contained in:
parent
4c4b4c4ab4
commit
bea2c59ea5
1 changed files with 1 additions and 0 deletions
|
|
@ -205,6 +205,7 @@ impl Clone for Literal {
|
|||
impl fmt::Debug for Literal {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Literal")
|
||||
// format the kind without quotes, as in `kind: Float`
|
||||
.field("kind", &format_args!("{}", &self.debug_kind()))
|
||||
.field("symbol", &self.symbol())
|
||||
// format `Some("...")` on one line even in {:#?} mode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue