diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2020-04-28 13:50:56 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2020-04-28 13:50:56 +0200 |
commit | d1b1dd013d5f50bcb903a97abe8d1700e6868170 (patch) | |
tree | 99a9ec294b02a9e4cdfd4e68e3a505f5fb26cdc4 | |
parent | 5a5cae93a325e9eb73b3c9e56fd7813ef4e04947 (diff) | |
download | gcd-d1b1dd013d5f50bcb903a97abe8d1700e6868170.tar.gz |
Remove closure
-rw-r--r-- | gcd.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -17,7 +17,7 @@ fn main () // XXX skip(1) to skip program name: let nums = env::args().skip(1).map(|s| s.parse().unwrap()); - let gcd = nums.fold(0, |g, n| gcd2(g, n)); + let gcd = nums.fold(0, gcd2); println!("{}", gcd); } |