mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-31 10:11:07 +00:00
Remove repeated contains
calls
This commit is contained in:
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…
x
Reference in New Issue
Block a user