File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,13 @@ ignorePaths:
55 - _typos.toml
66 - target/
77 - src/blocks/weather/met_no_legends.json
8+ - testdata/
89ignoreRegExpList :
910 # Ignore usernames that are @'d
1011 - /@[\w-]*/g
1112 # Ignore names in zbus::proxy
1213 - /#\[zbus::proxy\([\w\s=\.",\/]*\)\]/gm
13- # Ignore unicode characters
14+ # Ignore unicode characters
1415 - /(\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8})/g
1516words :
1617 - aarch
Original file line number Diff line number Diff line change @@ -178,13 +178,13 @@ async fn get_monitors() -> Result<Vec<Monitor>> {
178178}
179179
180180mod parser {
181+ use nom:: IResult ;
181182 use nom:: branch:: alt;
182183 use nom:: bytes:: complete:: { tag, take_until, take_while1} ;
183184 use nom:: character:: complete:: { i32, space0, space1, u32} ;
184185 use nom:: combinator:: opt;
185186 use nom:: number:: complete:: { double, float} ;
186187 use nom:: sequence:: preceded;
187- use nom:: IResult ;
188188
189189 /// Parses an output name, e.g. "HDMI-0", "eDP-1", etc.
190190 fn name ( input : & str ) -> IResult < & str , & str > {
@@ -277,7 +277,7 @@ mod parser {
277277
278278 i += 1 ;
279279 while i < lines. len ( ) {
280- if let Ok ( _ ) = parse_output_header ( & lines[ i] ) {
280+ if parse_output_header ( lines[ i] ) . is_ok ( ) {
281281 // found the next header
282282 break ;
283283 }
@@ -290,13 +290,13 @@ mod parser {
290290 // find the next v-clock line
291291 i += 1 ;
292292 while i < lines. len ( ) {
293- if let Ok ( _ ) = parse_output_header ( & lines[ i] ) {
293+ if parse_output_header ( lines[ i] ) . is_ok ( ) {
294294 // found the next header
295295 i -= 1 ;
296296 break ;
297297 }
298298
299- if let Ok ( ( _, hz) ) = parse_v_clock_hz ( & lines[ i] ) {
299+ if let Ok ( ( _, hz) ) = parse_v_clock_hz ( lines[ i] ) {
300300 refresh_hz = Some ( hz) ;
301301 break ;
302302 }
You can’t perform that action at this time.
0 commit comments