}.s.into()
}
- fn do_dollars(&self) -> bool {
- match self.dollars {
- Dollars::Filename => false,
- Dollars::Text => self.mformat >= 2,
- }
- }
+ fn do_dollars(&self) -> bool { self.dollars.enabled(self.mformat) }
#[throws(SubstError)]
/// Expand, but do not do final unescaping
}
}
+impl Dollars {
+ fn enabled(self, mformat: materials_format::Version) -> bool {
+ match self {
+ Dollars::Filename => false,
+ Dollars::Text => mformat >= 2,
+ }
+ }
+}
+
#[throws(SubstError)]
fn subst_general_precisely<'i>(input: &Substituting<'i>,
needle: & str,