Fix compilation without std feature
This commit is contained in:
parent
39c4e3e02b
commit
89503b254f
1 changed files with 14 additions and 11 deletions
|
|
@ -216,18 +216,21 @@ impl FontSystem {
|
||||||
pub fn cache_fonts(&mut self, mut ids: Vec<fontdb::ID>) {
|
pub fn cache_fonts(&mut self, mut ids: Vec<fontdb::ID>) {
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
|
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
|
||||||
ids = ids
|
#[cfg(feature = "std")]
|
||||||
.into_iter()
|
{
|
||||||
.filter(|id| {
|
ids = ids
|
||||||
let contains = self.font_cache.contains_key(id);
|
.into_iter()
|
||||||
if !contains {
|
.filter(|id| {
|
||||||
unsafe {
|
let contains = self.font_cache.contains_key(id);
|
||||||
self.db.make_shared_face_data(*id);
|
if !contains {
|
||||||
|
unsafe {
|
||||||
|
self.db.make_shared_face_data(*id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
!contains
|
||||||
!contains
|
})
|
||||||
})
|
.collect::<_>();
|
||||||
.collect::<_>();
|
}
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
let fonts = ids.par_iter();
|
let fonts = ids.par_iter();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue