Changing the defaults for ScanConfig

This commit is contained in:
godmodegalactus 2024-04-06 18:34:55 +02:00
parent 5d5366fe1f
commit e317e94c40
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
1 changed files with 10 additions and 1 deletions

View File

@ -91,7 +91,7 @@ pub enum UpsertReclaim {
IgnoreReclaims,
}
#[derive(Debug, Default)]
#[derive(Debug)]
pub struct ScanConfig {
/// checked by the scan. When true, abort scan.
pub abort: Option<Arc<AtomicBool>>,
@ -101,6 +101,15 @@ pub struct ScanConfig {
pub collect_all_unsorted: bool,
}
impl Default for ScanConfig {
fn default() -> Self {
Self {
collect_all_unsorted: true,
abort: None
}
}
}
impl ScanConfig {
pub fn new(collect_all_unsorted: bool) -> Self {
Self {