From af0ae81becdd3561c156cf060794996758ec227f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 31 May 2015 09:33:28 +0200 Subject: Use range syntax instead of explicitly creating ranges --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8c3a414..e218ab0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -114,12 +114,12 @@ impl Handler for PtpReflectorHandler { let forward = match domain { 0 => { msg[4] = 1; - vector_map_range_in_place(&mut msg, Range {start:20, end:28}, |&x| x ^ 0xff); + vector_map_range_in_place(&mut msg, 20..28, |&x| x ^ 0xff); match msg_type { 0x0 | 0x08 | 0xb => true, 0x9 if msg.len() >= 54 => { - vector_map_range_in_place(&mut msg, Range {start:44, end:52}, |&x| x ^ 0xff); + vector_map_range_in_place(&mut msg, 44..52, |&x| x ^ 0xff); true }, @@ -128,7 +128,7 @@ impl Handler for PtpReflectorHandler { }, 1 => { msg[4] = 0; - vector_map_range_in_place(&mut msg, Range {start:20, end:28}, |&x| x ^ 0xff); + vector_map_range_in_place(&mut msg, 20..28, |&x| x ^ 0xff); match msg_type { 0x1 => true, -- cgit v0.11.2-2-gd1dd