correct style failures

This commit is contained in:
Mark Thom
2023-11-11 18:41:46 +01:00
parent 83b9c6184c
commit 50c64b8512
4 changed files with 26 additions and 52 deletions

View File

@@ -166,12 +166,12 @@ impl DebrayAllocator {
for var_num in subsumed_hits { for var_num in subsumed_hits {
match &mut self.var_data.records[var_num].allocation { match &mut self.var_data.records[var_num].allocation {
VarAlloc::Perm(_, ref mut allocation) => { VarAlloc::Perm(_, ref mut allocation) => {
match allocation { if let PermVarAllocation::Done {
PermVarAllocation::Done {
shallow_safety, shallow_safety,
deep_safety, deep_safety,
.. ..
} => { } = allocation
{
if !self if !self
.branch_stack .branch_stack
.safety_unneeded_in_branch(shallow_safety, &branch_designator) .safety_unneeded_in_branch(shallow_safety, &branch_designator)
@@ -188,9 +188,6 @@ impl DebrayAllocator {
branch_occurrences.deep_safety.insert(var_num); branch_occurrences.deep_safety.insert(var_num);
} }
} }
_ => {
}
}
*allocation = PermVarAllocation::Pending; *allocation = PermVarAllocation::Pending;
} }

View File

@@ -876,7 +876,7 @@ impl ClauseIndexInfo {
} }
} }
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug, Default)]
pub(crate) struct PredicateInfo { pub(crate) struct PredicateInfo {
pub(crate) is_extensible: bool, pub(crate) is_extensible: bool,
pub(crate) is_discontiguous: bool, pub(crate) is_discontiguous: bool,
@@ -885,18 +885,7 @@ pub(crate) struct PredicateInfo {
pub(crate) has_clauses: bool, pub(crate) has_clauses: bool,
} }
impl Default for PredicateInfo {
#[inline]
fn default() -> Self {
PredicateInfo {
is_extensible: false,
is_discontiguous: false,
is_dynamic: false,
is_multifile: false,
has_clauses: false,
}
}
}
impl PredicateInfo { impl PredicateInfo {
#[inline] #[inline]

View File

@@ -148,9 +148,10 @@ impl<'a, LS: LoadState<'a>> Drop for Loader<'a, LS> {
} }
} }
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)] #[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, Default)]
pub enum CompilationTarget { pub enum CompilationTarget {
Module(Atom), Module(Atom),
#[default]
User, User,
} }
@@ -163,13 +164,6 @@ impl fmt::Display for CompilationTarget {
} }
} }
impl Default for CompilationTarget {
#[inline]
fn default() -> Self {
CompilationTarget::User
}
}
impl CompilationTarget { impl CompilationTarget {
#[inline] #[inline]
pub(crate) fn module_name(&self) -> Atom { pub(crate) fn module_name(&self) -> Atom {

View File

@@ -327,8 +327,9 @@ impl DoubleQuotes {
} }
} }
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, Default)]
pub enum Unknown { pub enum Unknown {
#[default]
Error, Error,
Fail, Fail,
Warn, Warn,
@@ -348,13 +349,6 @@ impl Unknown {
} }
} }
impl Default for Unknown {
#[inline]
fn default() -> Self {
Unknown::Error
}
}
pub fn default_op_dir() -> OpDir { pub fn default_op_dir() -> OpDir {
let mut op_dir = OpDir::with_hasher(FxBuildHasher::default()); let mut op_dir = OpDir::with_hasher(FxBuildHasher::default());