Skip to content

Commit efac01c

Browse files
authored
Merge pull request #201 from WaffleLapkin/undefault
Don't depend on `[!Default; 0]: Default` impl
2 parents 9a9da21 + c652829 commit efac01c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

solver/src/reasoners/cp/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ use std::collections::{HashMap, HashSet};
3434
#[derive(Clone, Default)]
3535
pub struct Watches {
3636
propagations: RefMap<SignedVar, Vec<PropagatorId>>,
37-
empty: [PropagatorId; 0],
3837
}
3938

4039
impl Watches {
@@ -71,7 +70,7 @@ impl Watches {
7170
/// Returns all propagators
7271
fn get_ub_watches(&self, var: impl Into<SignedVar>) -> &[PropagatorId] {
7372
let var = var.into();
74-
self.propagations.get(var).map(|v| v.as_slice()).unwrap_or(&self.empty)
73+
self.propagations.get(var).map(|v| v.as_slice()).unwrap_or(&[])
7574
}
7675
}
7776

0 commit comments

Comments
 (0)