Use #[derive(Default)]
instead of manually implementing it
This commit is contained in:
parent
e108481f74
commit
1f82b45b6a
8 changed files with 16 additions and 77 deletions
|
@ -168,9 +168,10 @@ pub struct CoverageOptions {
|
|||
}
|
||||
|
||||
/// Controls whether branch coverage or MC/DC coverage is enabled.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Default)]
|
||||
pub enum CoverageLevel {
|
||||
/// Instrument for coverage at the MIR block level.
|
||||
#[default]
|
||||
Block,
|
||||
/// Also instrument branch points (includes block coverage).
|
||||
Branch,
|
||||
|
@ -195,12 +196,6 @@ pub enum CoverageLevel {
|
|||
Mcdc,
|
||||
}
|
||||
|
||||
impl Default for CoverageLevel {
|
||||
fn default() -> Self {
|
||||
Self::Block
|
||||
}
|
||||
}
|
||||
|
||||
/// Settings for `-Z instrument-xray` flag.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
|
||||
pub struct InstrumentXRay {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue