`include_image!` now accepts expressions (#4521)

Closes https://github.com/emilk/egui/issues/4510
This commit is contained in:
YgorSouza 2024-05-21 22:44:27 +02:00 committed by GitHub
parent 262a8bcf98
commit 7035aa4e53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)),