Closed yallxe closed 1 year ago
Happened to me today too. The minimal example is:
#[derive(Serialize, Deserialize)]
struct A {
a: String,
b: String,
}
#[derive(Serialize, Deserialize)]
struct B {
a: String,
b: Vec<String>,
}
#[derive(Serialize, Deserialize)]
struct C {
a: A,
b: Vec<String>,
c: Vec<B>,
}
let a = toml::to_string(&C {
a: A {
a: "aa".to_string(),
b: "ab".to_string(),
},
b: vec!["b".to_string()],
c: vec![B {
a: "cba".to_string(),
b: vec!["cbb".to_string()],
}],
})
.unwrap();
I hit this too when on this commit, with the given cli arguments:
smm-cli installation add <any path on disk>
I have a few structs, given below
And when I try to make
HoggConfig
object a string usingtoml::to_string_pretty(&self)?
, I get an errorvalues must be emitted before tables
. How do I fix it?