Skip to content

Commit

Permalink
trait_impls: Use f.write_str in impl ToString
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Nov 16, 2020
1 parent 028e135 commit 30ce988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen/trait_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn generate_display(
call
)
} else {
format!("write!(f, \"{{}}\", {})", call)
format!("f.write_str(&{})", call)
};

writeln!(
Expand Down

0 comments on commit 30ce988

Please sign in to comment.