fixed broken singlethreaded support (whoops)
This commit is contained in:
parent
2431e3493a
commit
ce721c20f6
1 changed files with 3 additions and 2 deletions
|
@ -20,9 +20,10 @@ use std::path::{Path, PathBuf};
|
||||||
use clap::Clap;
|
use clap::Clap;
|
||||||
use log::{debug, info, trace, warn};
|
use log::{debug, info, trace, warn};
|
||||||
use once_cell::sync::OnceCell;
|
use once_cell::sync::OnceCell;
|
||||||
use rayon::prelude::*;
|
|
||||||
use smartstring::alias::String;
|
use smartstring::alias::String;
|
||||||
use walkdir::{DirEntry, WalkDir};
|
use walkdir::{DirEntry, WalkDir};
|
||||||
|
#[cfg(feature = "multi-threaded")]
|
||||||
|
use rayon::prelude::*;
|
||||||
|
|
||||||
use crate::findings::Findings;
|
use crate::findings::Findings;
|
||||||
use crate::formats::{Format, Script};
|
use crate::formats::{Format, Script};
|
||||||
|
@ -144,7 +145,7 @@ fn scan_from_walkdir(entries: Vec<DirEntry>) -> Vec<Result<Findings, (ScanError,
|
||||||
#[cfg(not(feature = "multi-threaded"))] {
|
#[cfg(not(feature = "multi-threaded"))] {
|
||||||
entries
|
entries
|
||||||
.iter()
|
.iter()
|
||||||
.map(|entry: &DirEntry| scan_file(db, entry))
|
.map(|entry: &DirEntry| scan_file(entry))
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue