use std::io;
use std::rand::random;

fn guessed_correctly(guess: uint, machine: uint) -> bool {
    if guess == machine {
        return true;
    }
    return false;
}

fn main() {
    let random_value = random::<uint>() % 10u;
    let mut guess = 0u;
    println!("{}", random_value);
    println!("{}", guessed_correctly(guess, random_value));

}

use std::rand::random;

fn main() {
    let random_value = random::<u8>() % 10u8;
    let mut guess = 0u8;

    println!("{}", random_value);

}

--- 
+++ 
@@ -1,17 +1,9 @@
-use std::io;
 use std::rand::random;
 
-fn guessed_correctly(guess: uint, machine: uint) -> bool {
-    if guess == machine {
-        return true;
-    }
-    return false;
-}
+fn main() {
+    let random_value = random::<u8>() % 10u8;
+    let mut guess = 0u8;
 
-fn main() {
-    let random_value = random::<uint>() % 10u;
-    let mut guess = 0u;
     println!("{}", random_value);
-    println!("{}", guessed_correctly(guess, random_value));
 
 }
Add function to check for equality
