Remove now-unneeded &s.

This commit is contained in:
Brian Smith 2018-05-10 13:38:03 -10:00
parent 4d767d55a5
commit dfb1293828
3 changed files with 9 additions and 9 deletions

View File

@ -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();

View File

@ -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 = {

View File

@ -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.");
}