Skip to content

Commit

Permalink
Further clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jun 19, 2024
1 parent 1452b1a commit c4fb3f0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/blitz/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,22 @@ where
.await
.expect("Error creating surface");

let default_threads = || -> Option<NonZeroUsize> {
#[cfg(target_arch = "macos")]
const DEFAULT_THREADS: Option<NonZeroUsize> = {
#[cfg(target_os = "macos")]
{
Some(NonZeroUsize::new(1)?)
NonZeroUsize::new(1)
}
#[cfg(not(target_os = "macos"))]
{
None
}
None
};

let options = RendererOptions {
surface_format: Some(surface.config.format),
antialiasing_support: AaSupport::all(),
use_cpu: false,
num_init_threads: default_threads(),
num_init_threads: DEFAULT_THREADS,
};

let renderer =
Expand Down

0 comments on commit c4fb3f0

Please sign in to comment.