oxilean_codegen/opt_strength/
strengthconfig_traits.rs1use crate::lcnf::*;
13
14use super::types::StrengthConfig;
15use std::fmt;
16
17impl Default for StrengthConfig {
18 fn default() -> Self {
19 StrengthConfig {
20 max_shift_count: 3,
21 optimize_div: true,
22 optimize_inc: true,
23 }
24 }
25}
26
27impl fmt::Display for StrengthConfig {
28 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
29 write!(
30 f,
31 "StrengthConfig {{ max_shift={}, opt_div={}, opt_inc={} }}",
32 self.max_shift_count, self.optimize_div, self.optimize_inc
33 )
34 }
35}