Fix conditional wgpu blocks in iced_renderer

This commit is contained in:
Héctor Ramón Jiménez 2025-11-21 02:11:27 +01:00
parent 84e559813a
commit c70f2ed91d
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 6 additions and 6 deletions

View file

@ -411,7 +411,7 @@ where
}
}
#[cfg(feature = "wgpu")]
#[cfg(feature = "wgpu-bare")]
impl<A, B> iced_wgpu::primitive::Renderer for Renderer<A, B>
where
A: iced_wgpu::primitive::Renderer,

View file

@ -1,7 +1,7 @@
//! The official renderer for iced.
#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(feature = "wgpu")]
#[cfg(feature = "wgpu-bare")]
pub use iced_wgpu as wgpu;
pub mod fallback;
@ -22,7 +22,7 @@ pub type Renderer = renderer::Renderer;
/// [`iced`]: https://github.com/iced-rs/iced
pub type Compositor = renderer::Compositor;
#[cfg(all(feature = "wgpu", feature = "tiny-skia"))]
#[cfg(all(feature = "wgpu-bare", feature = "tiny-skia"))]
mod renderer {
pub type Renderer = crate::fallback::Renderer<
iced_wgpu::Renderer,
@ -35,19 +35,19 @@ mod renderer {
>;
}
#[cfg(all(feature = "wgpu", not(feature = "tiny-skia")))]
#[cfg(all(feature = "wgpu-bare", not(feature = "tiny-skia")))]
mod renderer {
pub type Renderer = iced_wgpu::Renderer;
pub type Compositor = iced_wgpu::window::Compositor;
}
#[cfg(all(not(feature = "wgpu"), feature = "tiny-skia"))]
#[cfg(all(not(feature = "wgpu-bare"), feature = "tiny-skia"))]
mod renderer {
pub type Renderer = iced_tiny_skia::Renderer;
pub type Compositor = iced_tiny_skia::window::Compositor;
}
#[cfg(not(any(feature = "wgpu", feature = "tiny-skia")))]
#[cfg(not(any(feature = "wgpu-bare", feature = "tiny-skia")))]
mod renderer {
#[cfg(not(debug_assertions))]
compile_error!(