From 7035aa4e53148a73ccbe5a533b7976c3b50524eb Mon Sep 17 00:00:00 2001 From: YgorSouza <43298013+YgorSouza@users.noreply.github.com> Date: Tue, 21 May 2024 22:44:27 +0200 Subject: [PATCH] `include_image!` now accepts expressions (#4521) Closes https://github.com/emilk/egui/issues/4510 --- crates/egui/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index b367158a5..c9d9b37ce 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -507,7 +507,7 @@ pub fn warn_if_debug_build(ui: &mut crate::Ui) { /// ``` #[macro_export] macro_rules! include_image { - ($path: literal) => { + ($path:expr $(,)?) => { $crate::ImageSource::Bytes { uri: ::std::borrow::Cow::Borrowed(concat!("bytes://", $path)), bytes: $crate::load::Bytes::Static(include_bytes!($path)),