1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

change format("{}", VAR) to VAR.to_string()

This commit is contained in:
René Rössler
2022-02-09 12:49:32 +01:00
parent b91855ca94
commit afe583034a
3 changed files with 13 additions and 13 deletions

View File

@@ -56,7 +56,7 @@ impl super::View for TableDemo {
if self.virtual_scrool {
body.rows(20.0, 100_000, |index, mut row| {
row.col(|ui| {
ui.label(format!("{}", index));
ui.label(index.to_string());
});
row.col(|ui| {
ui.add(
@@ -65,7 +65,7 @@ impl super::View for TableDemo {
);
});
row.col(|ui| {
ui.label(format!("{}", index));
ui.label(index.to_string());
});
});
} else {
@@ -77,7 +77,7 @@ impl super::View for TableDemo {
};
body.row(height, |mut row| {
row.col(|ui| {
ui.label(format!("{}", i));
ui.label(i.to_string());
});
row.col(|ui| {
ui.add(
@@ -88,7 +88,7 @@ impl super::View for TableDemo {
);
});
row.col(|ui| {
ui.label(format!("{}", i));
ui.label(i.to_string());
});
});
}

View File

@@ -7,7 +7,7 @@ pub fn serialize<S>(date: &Date<Utc>, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
let s = format!("{}", date.format(FORMAT));
let s = date.format(FORMAT).to_string();
serializer.serialize_str(&s)
}