Skip to content

Commit

Permalink
Use to_string instead of format!.
Browse files Browse the repository at this point in the history
  • Loading branch information
KmolYuan committed Oct 11, 2023
1 parent 9c9c6d6 commit eba3008
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion four-bar-ui/src/app/widgets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub(crate) fn counter(
if res1.clicked() {
*val -= 1;
}
ui.label(format!("{val}"));
ui.label(val.to_string());
let at_max = val != rng.end();
let res2 = ui.add_enabled(at_max, Button::new("+"));
if res2.clicked() {
Expand Down
2 changes: 1 addition & 1 deletion four-bar-ui/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl<T, E: std::error::Error> Alert for Result<T, E> {
{
match self {
Ok(t) => done(t),
Err(e) => alert(title, format!("{e}")),
Err(e) => alert(title, e.to_string()),
}
}
}
Expand Down

0 comments on commit eba3008

Please sign in to comment.