These are chat archives for rust-lang/rust

8th
Jun 2016
Aditya Singh
@adiultra
Jun 08 2016 13:07
How can I have an array of struct in another struct , I would like to impelement the following, But please help me how to?
struct Todo {
    todo: &'static str,
    index: i32,
}

struct List {
    list: Todo[20],
}
Yuri Setiantoko
@zerosign
Jun 08 2016 13:08
Use vec
Aditya Singh
@adiultra
Jun 08 2016 13:09
Um I am a little confused with vectors
Yuri Setiantoko
@zerosign
Jun 08 2016 13:14
I'm away from notebook right now, but you might want try to dig this rust-lang/rust#7622
Cmiiw
Aditya Singh
@adiultra
Jun 08 2016 13:19
thanks :+1: , I am currently digging in other thing, would look into vecs later
Yuri Setiantoko
@zerosign
Jun 08 2016 13:31
:+1:
Peter Atashian
@retep998
Jun 08 2016 20:27
@adiultra If you do want to have an array you can do list: [Todo; 20]