Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Clone)]
- pub struct Event {
- title: String,
- }
- fn main() {
- let event = vec![Event{title:"a".to_string()}, Event{title:"b".to_string()}, Event{title:"c".to_string()}];
- let evt = event.first().unwrap().clone();
- tho(evt);
- }
- fn tho(evt: Event) {}
Add Comment
Please, Sign In to add comment