Opt for .cloned() over .map(|x| x.clone()) etc.
This commit is contained in:
parent
5705d48e28
commit
2f586b9687
39 changed files with 67 additions and 81 deletions
|
|
@ -134,7 +134,7 @@ fn run<W: Writer>(writer: &mut W) -> std::old_io::IoResult<()> {
|
|||
('t', 0.3015094502008)];
|
||||
|
||||
try!(make_fasta(writer, ">ONE Homo sapiens alu\n",
|
||||
alu.as_bytes().iter().cycle().map(|c| *c), n * 2));
|
||||
alu.as_bytes().iter().cycle().cloned(), n * 2));
|
||||
try!(make_fasta(writer, ">TWO IUB ambiguity codes\n",
|
||||
AAGen::new(rng, iub), n * 3));
|
||||
try!(make_fasta(writer, ">THREE Homo sapiens frequency\n",
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ fn handle_sol(raw_sol: &List<u64>, data: &mut Data) {
|
|||
// reverse order, i.e. the board rotated by half a turn.
|
||||
data.nb += 2;
|
||||
let sol1 = to_vec(raw_sol);
|
||||
let sol2: Vec<u8> = sol1.iter().rev().map(|x| *x).collect();
|
||||
let sol2: Vec<u8> = sol1.iter().rev().cloned().collect();
|
||||
|
||||
if data.nb == 2 {
|
||||
data.min = sol1.clone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue