diff --git a/examples/editor/src/main.rs b/examples/editor/src/main.rs index d55f9bdfec..bc10e43c6e 100644 --- a/examples/editor/src/main.rs +++ b/examples/editor/src/main.rs @@ -53,9 +53,9 @@ impl Editor { }, Task::batch([ Task::perform( - load_file(format!( - "{}/src/main.rs", - env!("CARGO_MANIFEST_DIR") + load_file(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/main.rs", )), Message::FileOpened, ), diff --git a/examples/ferris/src/main.rs b/examples/ferris/src/main.rs index eaf51354fa..95f2c12cb2 100644 --- a/examples/ferris/src/main.rs +++ b/examples/ferris/src/main.rs @@ -95,9 +95,9 @@ impl Image { let i_am_ferris = column![ "Hello!", Element::from( - image(format!( - "{}/../tour/images/ferris.png", - env!("CARGO_MANIFEST_DIR") + image(concat!( + env!("CARGO_MANIFEST_DIR"), + "/../tour/images/ferris.png", )) .width(self.width) .content_fit(self.content_fit) diff --git a/examples/svg/src/main.rs b/examples/svg/src/main.rs index 02cb85cc0f..64ac316310 100644 --- a/examples/svg/src/main.rs +++ b/examples/svg/src/main.rs @@ -25,9 +25,9 @@ impl Tiger { } fn view(&self) -> Element { - let handle = svg::Handle::from_path(format!( - "{}/resources/tiger.svg", - env!("CARGO_MANIFEST_DIR") + let handle = svg::Handle::from_path(concat!( + env!("CARGO_MANIFEST_DIR"), + "/resources/tiger.svg", )); let svg = diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index d8c0b29ab4..f13e501fcb 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -549,7 +549,7 @@ fn ferris<'a>( if cfg!(target_arch = "wasm32") { image("tour/images/ferris.png") } else { - image(format!("{}/images/ferris.png", env!("CARGO_MANIFEST_DIR"))) + image(concat!(env!("CARGO_MANIFEST_DIR"), "/images/ferris.png")) } .filter_method(filter_method) .width(width), diff --git a/runtime/src/debug/basic.rs b/runtime/src/debug/basic.rs index 4c994a2f94..6ee0892b78 100644 --- a/runtime/src/debug/basic.rs +++ b/runtime/src/debug/basic.rs @@ -147,12 +147,16 @@ impl Debug { format!("{key} {value:?}") } - lines.push(format!( - "{} {} - {}", - env!("CARGO_PKG_NAME"), - env!("CARGO_PKG_VERSION"), - env!("CARGO_PKG_REPOSITORY"), - )); + lines.push( + concat!( + env!("CARGO_PKG_NAME"), + " ", + env!("CARGO_PKG_VERSION"), + " - ", + env!("CARGO_PKG_REPOSITORY"), + ) + .to_string(), + ); lines.push(key_value("Startup:", self.startup_duration)); lines.push(key_value("Update:", self.update_durations.average())); lines.push(key_value("View:", self.view_durations.average()));