Skip to content

Incorrect display implementation for assignment operators #12971

Closed
@atynagano

Description

@atynagano

BinaryOp::Assignment { op } => {
f.write_str("=")?;
if let Some(op) = op {
fmt::Display::fmt(op, f)?;
}
Ok(())
}

Isn't the order reversed?

 BinaryOp::Assignment { op } => { 
     if let Some(op) = op { 
         fmt::Display::fmt(op, f)?; 
     } 
     f.write_str("=")?; 
     Ok(()) 
 } 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions