From 5ddb6c8bf328de3ac886b1eb2736c0d839760765 Mon Sep 17 00:00:00 2001 From: Ygor Souza Date: Tue, 21 May 2024 20:33:00 +0200 Subject: [PATCH] Make include_image match the same syntax as include_bytes Close #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 b367158a58b..c9d9b37ce48 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)),