Make compatible_window mandatory in Compositor

This commit is contained in:
Héctor Ramón Jiménez 2024-01-18 10:06:30 +01:00
parent 1701ec815d
commit 5fc49edc55
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
6 changed files with 18 additions and 25 deletions

View file

@ -24,7 +24,7 @@ impl<Theme> crate::graphics::Compositor for Compositor<Theme> {
fn new<W: Window + Clone>(
settings: Self::Settings,
compatible_window: Option<W>,
compatible_window: W,
) -> Result<Self, Error> {
let candidates =
Candidate::list_from_env().unwrap_or(Candidate::default_list());
@ -228,7 +228,7 @@ impl Candidate {
fn build<Theme, W: Window>(
self,
settings: Settings,
_compatible_window: Option<W>,
_compatible_window: W,
) -> Result<Compositor<Theme>, Error> {
match self {
Self::TinySkia => {