Performing the Lychrel algorithm in Rust
Use const instead of static if you don't need to take the address of the global.
Use for over a range instead of mutating a counter.
It's a little strange to return a value when the iteration runs out. Perhaps an Option would be better?
There's no need to take references just to compare for equality; eq takes &amp;self.
Don't need &amp;next or &amp;rev when adding to get next because we no longer need these values.
reverse_str does more than just reverse; perhaps a better name is in order?
No need to collect all the arguments to an array, just use the iterator directly.




extern crate num;
extern crate time;

use num::bigint::BigInt;
use num::FromPrimitive;
use time::PreciseTime;
use std::env;

const LIMIT: u64 = 5000;

fn lychrel(number: u64) -&gt; BigInt {
    let mut next = FromPrimitive::from_u64(number).unwrap();
    let mut rev;

    for i in 0..LIMIT {
        rev = reverse_str(&amp;next);

        if next == rev {
            break;
        }

        next = next + rev;

        if i % 1000 == 0 {
            println!("{} iterations complete.", i)
        }
    }

    next
}

fn reverse_str(number: &amp;BigInt) -&gt; BigInt {
    let reverse_string: String = number.to_string().chars().rev().collect();
    let reverse_value: BigInt = reverse_string.parse().unwrap();
    number + reverse_value
}

fn main() {
    let arg = env::args().nth(1).expect("Usage: ./lychrel &lt;number&gt;");

    let start = PreciseTime::now();
    let input = arg.parse::&lt;u64&gt;().expect("Argument must be a number");
    lychrel(input);
    let end = PreciseTime::now();

    println!("Processed {} iterations in {} seconds.", LIMIT, start.to(end));
}


I think it would be interesting to convert the iteration to an iterator.