Remove repeated `contains` calls

pull/1445/head
Lovecraftian Horror 4 years ago committed by David Peter
parent ab4c120ea5
commit b349155f2f

@ -83,3 +83,4 @@ clap = { version = "2.33", optional = true }
[profile.release]
lto = true
codegen-units = 1
# debug = true

@ -197,6 +197,8 @@ impl<'b> Controller<'b> {
let mut first_range: bool = true;
let mut mid_range: bool = false;
let style_snip = self.config.style_components.snip();
while reader.read_line(&mut line_buffer)? {
match line_ranges.check(line_number) {
RangeCheckResult::BeforeOrBetweenRanges => {
@ -207,7 +209,7 @@ impl<'b> Controller<'b> {
}
RangeCheckResult::InRange => {
if self.config.style_components.snip() {
if style_snip {
if first_range {
first_range = false;
mid_range = true;

Loading…
Cancel
Save