oh just cargo fmt it all
This commit is contained in:
@@ -6,8 +6,6 @@ enum IpAddrKind {
|
||||
V6,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// One might try to use an enum and a struct to give it types, like this:
|
||||
#[derive(Debug)]
|
||||
struct IpAddr {
|
||||
@@ -22,7 +20,6 @@ enum IpAddrConcise {
|
||||
V6(String),
|
||||
}
|
||||
|
||||
|
||||
pub fn run() {
|
||||
println!("\n=== defining enums ===\n");
|
||||
route(IpAddrKind::V4);
|
||||
@@ -49,9 +46,8 @@ pub fn run() {
|
||||
|
||||
println!("the home address is {home:#?}");
|
||||
println!("the loopback address is {loopback:#?}");
|
||||
|
||||
}
|
||||
|
||||
fn route (ip_kind: IpAddrKind) {
|
||||
fn route(ip_kind: IpAddrKind) {
|
||||
println!("your ip kind is {ip_kind:#?}");
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::match_control_flow::UsState::Alabama;
|
||||
#[derive(Debug)]
|
||||
enum UsState {
|
||||
Alabama,
|
||||
Alaska
|
||||
Alaska,
|
||||
}
|
||||
|
||||
// Her we define a basic enum
|
||||
|
||||
Reference in New Issue
Block a user