1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00:04 -04:00

egui_extras: always depend on log crate (#3336)

* egui_extras: always depend on `log` crate

* syntax_highlighting fix: "serde" is always on

* Add "serde" flag to egui when using egui_extras
This commit is contained in:
Emil Ernerfeldt
2023-09-14 11:20:34 +02:00
committed by GitHub
parent 5e785ae00a
commit e367c20779
11 changed files with 26 additions and 121 deletions

View File

@@ -47,7 +47,7 @@ impl ImageLoader for SvgLoader {
} else {
match ctx.try_load_bytes(&uri) {
Ok(BytesPoll::Ready { bytes, .. }) => {
crate::log_trace!("started loading {uri:?}");
log::trace!("started loading {uri:?}");
let fit_to = match size_hint {
SizeHint::Scale(factor) => usvg::FitTo::Zoom(factor.into_inner()),
SizeHint::Width(w) => usvg::FitTo::Width(w),
@@ -56,7 +56,7 @@ impl ImageLoader for SvgLoader {
};
let result =
crate::image::load_svg_bytes_with_size(&bytes, fit_to).map(Arc::new);
crate::log_trace!("finished loading {uri:?}");
log::trace!("finished loading {uri:?}");
cache.insert((uri, size_hint), result.clone());
match result {
Ok(image) => Ok(ImagePoll::Ready { image }),