From dfb1293828be07352f88063be0e58f79bae09000 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 10 May 2018 13:38:03 -1000 Subject: [PATCH] Remove now-unneeded `&`s. --- build.rs | 2 +- src/ec/suite_b/ops/mod.rs | 4 ++-- src/test.rs | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.rs b/build.rs index 098b4f780..bbb62a754 100644 --- a/build.rs +++ b/build.rs @@ -390,7 +390,7 @@ fn build_c_code(target: &Target, pregenerated: PathBuf, out_dir: &Path) { } } - let &(_, _, perlasm_format) = ASM_TARGETS.iter().find(|entry| { + let (_, _, perlasm_format) = ASM_TARGETS.iter().find(|entry| { let &(entry_arch, entry_os, _) = *entry; entry_arch == target.arch() && is_none_or_equals(entry_os, target.os()) }).unwrap(); diff --git a/src/ec/suite_b/ops/mod.rs b/src/ec/suite_b/ops/mod.rs index 9bc84f922..5e02f33cd 100644 --- a/src/ec/suite_b/ops/mod.rs +++ b/src/ec/suite_b/ops/mod.rs @@ -908,11 +908,11 @@ mod tests { let actual_y = &cops.point_y(&actual_point); let actual_z = &cops.point_z(&actual_point); match expected_point { - &TestPoint::Infinity => { + TestPoint::Infinity => { let zero = Elem::zero(); assert_elems_are_equal(cops, &actual_z, &zero); }, - &TestPoint::Affine(expected_x, expected_y) => { + TestPoint::Affine(expected_x, expected_y) => { let zz_inv = ops.elem_inverse_squared(&actual_z); let x_aff = cops.elem_product(&actual_x, &zz_inv); let y_aff = { diff --git a/src/test.rs b/src/test.rs index 1a04e7e5b..d138e3d84 100644 --- a/src/test.rs +++ b/src/test.rs @@ -193,14 +193,14 @@ impl TestCase { let mut s = s.as_bytes().iter().skip(1); loop { let b = match s.next() { - Some(&b'\\') => { + Some(b'\\') => { match s.next() { // We don't allow all octal escape sequences, only "\0" for null. - Some(&b'0') => 0u8, - Some(&b't') => b'\t', - Some(&b'n') => b'\n', + Some(b'0') => 0u8, + Some(b't') => b'\t', + Some(b'n') => b'\n', // "\xHH" - Some(&b'x') => { + Some(b'x') => { let hi = s.next().expect("Invalid hex escape sequence in string."); let lo = s.next().expect("Invalid hex escape sequence in string."); if let (Ok(hi), Ok(lo)) = @@ -215,7 +215,7 @@ impl TestCase { } } }, - Some(&b'"') => { + Some(b'"') => { if s.next().is_some() { panic!("characters after the closing quote of a quoted string."); }