1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Inline log format args (#7600)

This commit is contained in:
Emil Ernerfeldt
2025-10-07 16:14:43 +02:00
committed by GitHub
parent ac4e04d0b8
commit 86dc9ea64e
15 changed files with 34 additions and 49 deletions

View File

@@ -198,15 +198,14 @@ impl CaptureState {
wgpu::TextureFormat::Bgra8Unorm => [2, 1, 0, 3],
_ => {
log::error!(
"Screen can't be captured unless the surface format is Rgba8Unorm or Bgra8Unorm. Current surface format is {:?}",
format
"Screen can't be captured unless the surface format is Rgba8Unorm or Bgra8Unorm. Current surface format is {format:?}"
);
return;
}
};
buffer_slice.map_async(wgpu::MapMode::Read, move |result| {
if let Err(err) = result {
log::error!("Failed to map buffer for reading: {:?}", err);
log::error!("Failed to map buffer for reading: {err}");
return;
}
let buffer_slice = buffer.slice(..);

View File

@@ -344,7 +344,7 @@ impl Renderer {
fragment: Some(wgpu::FragmentState {
module: &module,
entry_point: Some(if output_color_format.is_srgb() {
log::warn!("Detected a linear (sRGBA aware) framebuffer {:?}. egui prefers Rgba8Unorm or Bgra8Unorm", output_color_format);
log::warn!("Detected a linear (sRGBA aware) framebuffer {output_color_format:?}. egui prefers Rgba8Unorm or Bgra8Unorm");
"fs_main_linear_framebuffer"
} else {
"fs_main_gamma_framebuffer" // this is what we prefer

View File

@@ -64,7 +64,7 @@ impl WgpuSetup {
}
}
log::debug!("Creating wgpu instance with backends {:?}", backends);
log::debug!("Creating wgpu instance with backends {backends:?}");
wgpu::util::new_instance_with_webgpu_detection(&create_new.instance_descriptor)
.await
}