Execute the following command to run ./solutions/examples/generic.rs
cargo run --example genericExercises are in ./exercises/src/lib.rs
pub fn first(t: (u32, i32)) -> u32 {
t.0
}Turn this function into a generic function.
pub fn last(t: (u32, i32)) -> i32 {
t.1
}Turn this function into a generic function.
#[derive(Debug)]
pub struct Rectangle {
pub top: u32,
pub left: u32,
pub width: u32,
pub height: u32,
}Turn this struct into a generic struct.
cargo test