summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-05-31 07:33:28 (GMT)
committerSebastian Dröge <sebastian@centricular.com>2015-05-31 07:33:28 (GMT)
commitaf0ae81becdd3561c156cf060794996758ec227f (patch)
treee93edef8e8dbd3feb0b4ce10301e873144f82b73 /src/main.rs
parente1d8ebc353d9e340254dc90608fce88457073090 (diff)
downloadptp-clock-reflector-af0ae81becdd3561c156cf060794996758ec227f.zip
ptp-clock-reflector-af0ae81becdd3561c156cf060794996758ec227f.tar.gz
Use range syntax instead of explicitly creating ranges
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files 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,