(러스트롱) 50차 시행

/* use std::fmt:Display; fn print_vec<T: Display>(input: &Vec<T>) { for item in input { print!(“{item} “); } println!(); } fn main() { let array_vec = String::from(“thth”); print_vec(&array_vec); let str_vec = Vec::from(“What kind of vec is this?”); print_vec(&str_vec); let string_vec = Vec::from(“What kind of vec is a String vec?”); print_vec(&string_vec); } */ #(derive(Debug)) struct City { name: … Read more