Fix compilation without std feature
This commit is contained in:
parent
39c4e3e02b
commit
89503b254f
1 changed files with 14 additions and 11 deletions
|
|
@ -216,6 +216,8 @@ 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};
|
||||||
|
#[cfg(feature = "std")]
|
||||||
|
{
|
||||||
ids = ids
|
ids = ids
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|id| {
|
.filter(|id| {
|
||||||
|
|
@ -228,6 +230,7 @@ impl FontSystem {
|
||||||
!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