Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
Replace write!() with write_str()
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Nov 24, 2020
1 parent abdf6c1 commit 77deb68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cairo/src/surface_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ macro_rules! declare_surface {

impl fmt::Display for $surf_name {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", stringify!($surf_name))
f.write_str(stringify!($surf_name))
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion glib/src/gstring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl Drop for GString {

impl fmt::Display for GString {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.as_str())
f.write_str(self.as_str())
}
}

Expand Down
4 changes: 2 additions & 2 deletions glib/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ impl Default for String {

impl fmt::Debug for String {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.to_string_lossy())
f.write_str(&self.to_string_lossy())
}
}

impl fmt::Display for String {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.to_string_lossy())
f.write_str(&self.to_string_lossy())
}
}

Expand Down

0 comments on commit 77deb68

Please sign in to comment.