Fix some comments in parsing of from/try_from/into attributes

This commit is contained in:
David Tolnay 2023-03-10 14:16:11 -08:00
parent 0e70f59021
commit 183b91775e
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -490,21 +490,21 @@ impl Container {
}
}
// Parse `#[serde(from = "Type")]
// Parse `#[serde(from = "Type")]`
Meta(NameValue(m)) if m.path == FROM => {
if let Ok(from_ty) = parse_lit_into_ty(cx, FROM, &m.lit) {
type_from.set_opt(&m.path, Some(from_ty));
}
}
// Parse `#[serde(try_from = "Type")]
// Parse `#[serde(try_from = "Type")]`
Meta(NameValue(m)) if m.path == TRY_FROM => {
if let Ok(try_from_ty) = parse_lit_into_ty(cx, TRY_FROM, &m.lit) {
type_try_from.set_opt(&m.path, Some(try_from_ty));
}
}
// Parse `#[serde(into = "Type")]
// Parse `#[serde(into = "Type")]`
Meta(NameValue(m)) if m.path == INTO => {
if let Ok(into_ty) = parse_lit_into_ty(cx, INTO, &m.lit) {
type_into.set_opt(&m.path, Some(into_ty));