Skip to content

Commit 401c134

Browse files
Remove duplicate struct member from IRPrintConfig and clean up from Option
print_after_only_on_change is the same configuration as print_ir_after_modification. I removed the former simply because the latter has the same format as the other print_ir flags. Signed-off-by: Tomas Fabrizio Orsi <[email protected]>
1 parent 242d6db commit 401c134

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

hir/src/pass/manager.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ pub enum PassDisplayMode {
4141
#[derive(Default, Debug)]
4242
pub struct IRPrintingConfig {
4343
print_module_scope: bool,
44-
print_after_only_on_change: bool,
4544
print_after_only_on_failure: bool,
4645
// NOTE: Taken from the Options struct
4746
print_ir_after_all: bool,
@@ -52,11 +51,12 @@ pub struct IRPrintingConfig {
5251

5352
impl From<&Options> for IRPrintingConfig {
5453
fn from(options: &Options) -> Self {
55-
let mut irprintconfig = IRPrintingConfig::default();
56-
57-
irprintconfig.print_ir_after_all = options.print_ir_after_all;
58-
irprintconfig.print_ir_after_pass = options.print_ir_after_pass.clone();
59-
irprintconfig.print_ir_after_modified = options.print_ir_after_modified;
54+
let irprintconfig = IRPrintingConfig {
55+
print_ir_after_all: options.print_ir_after_all,
56+
print_ir_after_pass: options.print_ir_after_pass.clone(),
57+
print_ir_after_modified: options.print_ir_after_modified,
58+
..Default::default()
59+
};
6060

6161
irprintconfig
6262
}

0 commit comments

Comments
 (0)