fn points(self) -> i32 {
        match self {
            Shot::Bullseye => 5,
            Shot::Hit(x)   => if x < 3.0 { 2 } else { 1 },
            Shot::Miss     => 0,
        }
    }
// Here is a method for the `Shot` enum you just defined.
// Convert a shot into points
//  - use :: to go into the namespace of the enum
//  - the 'match' must cover all variants of the enum (don't cate is '_')
Here is a method for the `Shot` enum you just defined.
Here is a method for the ` Shot ` enum you just defined .
fn points(self) -> i32 {
        match self {
            Shot::Bullseye => 5,
            Shot::Hit(x)   => if x < 3.0 { 2 } else { 1 },
            Shot::Miss     => 0,
        }
    }
fn points ( self ) -> i32 { match self { Shot :: Bullseye => 5 , Shot :: Hit ( x ) => if x < 3.0 { 2 } else { 1 } , Shot :: Miss => 0 , } }
Here is a method for the `Shot` enum you just defined.
Here is a method for the ` Shot ` enum you just defined .
self
self