Fix compilation without std feature

This commit is contained in:
Jeremy Soller 2024-06-05 08:19:34 -06:00
parent 39c4e3e02b
commit 89503b254f
No known key found for this signature in database
GPG key ID: D02FD439211AF56F

View file

@ -216,6 +216,8 @@ impl FontSystem {
pub fn cache_fonts(&mut self, mut ids: Vec<fontdb::ID>) {
#[cfg(feature = "std")]
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
#[cfg(feature = "std")]
{
ids = ids
.into_iter()
.filter(|id| {
@ -228,6 +230,7 @@ impl FontSystem {
!contains
})
.collect::<_>();
}
#[cfg(feature = "std")]
let fonts = ids.par_iter();