Skip to content
Myr

Fix "unnecessary braces" warning

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Original warning: ``` warning: unnecessary braces around block return value --> src/filter/size.rs:5:39 | 5 | static ref SIZE_CAPTURES: Regex = { Regex::new(r"(?i)^([+-])(\d+)(b|[kmgt]i?b?)$").unwrap() }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces | = note: `#[warn(unused_braces)]` on by default warning: 1 warning emitted ```

authored by Alex Kitchens · committed by David Peter · parent 4f43301 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/filter/size.rs+1 added-1 removed
1use lazy_static::lazy_static;2use regex::Regex;34lazy_static! {5 static ref SIZE_CAPTURES: Regex = { Regex::new(r"(?i)^([+-])(\d+)(b|[kmgt]i?b?)$").unwrap() };5 static ref SIZE_CAPTURES: Regex = Regex::new(r"(?i)^([+-])(\d+)(b|[kmgt]i?b?)$").unwrap();6}78#[derive(Clone, Copy, Debug, PartialEq)]9pub enum SizeFilter {
200 unmodified lines