Skip to content

Commit 25c397e

Browse files
committed
Fix clippy
1 parent 6644c74 commit 25c397e

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/dovi/editor.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -295,16 +295,16 @@ impl EditConfig {
295295
if range.contains('-') {
296296
let mut split = range.split('-');
297297

298-
if let Some(first) = split.next() {
299-
if let Ok(first_num) = first.parse() {
300-
result.0 = first_num;
301-
}
298+
if let Some(first) = split.next()
299+
&& let Ok(first_num) = first.parse()
300+
{
301+
result.0 = first_num;
302302
}
303303

304-
if let Some(second) = split.next() {
305-
if let Ok(second_num) = second.parse() {
306-
result.1 = second_num;
307-
}
304+
if let Some(second) = split.next()
305+
&& let Ok(second_num) = second.parse()
306+
{
307+
result.1 = second_num;
308308
}
309309

310310
Ok(result)
@@ -430,11 +430,11 @@ impl EditConfig {
430430
// Allow passing "all" instead of a range
431431
// Do "all" presets before specific ranges
432432
for edit in edits {
433-
if edit.0.to_lowercase() == "all" {
434-
if let Some(vdr_dm_data) = rpu.vdr_dm_data.as_mut() {
435-
rpu.modified = true;
436-
vdr_dm_data.set_scene_cut(*edit.1);
437-
}
433+
if edit.0.to_lowercase() == "all"
434+
&& let Some(vdr_dm_data) = rpu.vdr_dm_data.as_mut()
435+
{
436+
rpu.modified = true;
437+
vdr_dm_data.set_scene_cut(*edit.1);
438438
}
439439
}
440440

@@ -510,10 +510,10 @@ impl EditConfig {
510510

511511
impl ActiveArea {
512512
fn execute(&self, rpus: &mut [Option<DoviRpu>]) -> Result<()> {
513-
if let Some(edits) = &self.edits {
514-
if !edits.is_empty() {
515-
self.do_edits(edits, rpus)?;
516-
}
513+
if let Some(edits) = &self.edits
514+
&& !edits.is_empty()
515+
{
516+
self.do_edits(edits, rpus)?;
517517
}
518518

519519
Ok(())

0 commit comments

Comments
 (0)