mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-14 14:01:02 +00:00
Abbreviate and touch up some attribute parsing comments
This commit is contained in:
@@ -272,7 +272,7 @@ impl Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse `#[serde(bound = "D: Serialize")]`
|
// Parse `#[serde(bound = "T: SomeBound")]`
|
||||||
Meta(NameValue(ref m)) if m.ident == "bound" => {
|
Meta(NameValue(ref m)) if m.ident == "bound" => {
|
||||||
if let Ok(where_predicates) =
|
if let Ok(where_predicates) =
|
||||||
parse_lit_into_where(cx, &m.ident, &m.ident, &m.lit)
|
parse_lit_into_where(cx, &m.ident, &m.ident, &m.lit)
|
||||||
@@ -282,7 +282,7 @@ impl Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse `#[serde(bound(serialize = "D: Serialize", deserialize = "D: Deserialize"))]`
|
// Parse `#[serde(bound(serialize = "...", deserialize = "..."))]`
|
||||||
Meta(List(ref m)) if m.ident == "bound" => {
|
Meta(List(ref m)) if m.ident == "bound" => {
|
||||||
if let Ok((ser, de)) = get_where_predicates(cx, &m.nested) {
|
if let Ok((ser, de)) = get_where_predicates(cx, &m.nested) {
|
||||||
ser_bound.set_opt(ser);
|
ser_bound.set_opt(ser);
|
||||||
@@ -617,7 +617,7 @@ impl Variant {
|
|||||||
other.set_true();
|
other.set_true();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse `#[serde(bound = "D: Serialize")]`
|
// Parse `#[serde(bound = "T: SomeBound")]`
|
||||||
Meta(NameValue(ref m)) if m.ident == "bound" => {
|
Meta(NameValue(ref m)) if m.ident == "bound" => {
|
||||||
if let Ok(where_predicates) =
|
if let Ok(where_predicates) =
|
||||||
parse_lit_into_where(cx, &m.ident, &m.ident, &m.lit)
|
parse_lit_into_where(cx, &m.ident, &m.ident, &m.lit)
|
||||||
@@ -627,7 +627,7 @@ impl Variant {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse `#[serde(bound(serialize = "D: Serialize", deserialize = "D: Deserialize"))]`
|
// Parse `#[serde(bound(serialize = "...", deserialize = "..."))]`
|
||||||
Meta(List(ref m)) if m.ident == "bound" => {
|
Meta(List(ref m)) if m.ident == "bound" => {
|
||||||
if let Ok((ser, de)) = get_where_predicates(cx, &m.nested) {
|
if let Ok((ser, de)) = get_where_predicates(cx, &m.nested) {
|
||||||
ser_bound.set_opt(ser);
|
ser_bound.set_opt(ser);
|
||||||
@@ -921,7 +921,7 @@ impl Field {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse `#[serde(bound = "D: Serialize")]`
|
// Parse `#[serde(bound = "T: SomeBound")]`
|
||||||
Meta(NameValue(ref m)) if m.ident == "bound" => {
|
Meta(NameValue(ref m)) if m.ident == "bound" => {
|
||||||
if let Ok(where_predicates) =
|
if let Ok(where_predicates) =
|
||||||
parse_lit_into_where(cx, &m.ident, &m.ident, &m.lit)
|
parse_lit_into_where(cx, &m.ident, &m.ident, &m.lit)
|
||||||
@@ -931,7 +931,7 @@ impl Field {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse `#[serde(bound(serialize = "D: Serialize", deserialize = "D: Deserialize"))]`
|
// Parse `#[serde(bound(serialize = "...", deserialize = "..."))]`
|
||||||
Meta(List(ref m)) if m.ident == "bound" => {
|
Meta(List(ref m)) if m.ident == "bound" => {
|
||||||
if let Ok((ser, de)) = get_where_predicates(cx, &m.nested) {
|
if let Ok((ser, de)) = get_where_predicates(cx, &m.nested) {
|
||||||
ser_bound.set_opt(ser);
|
ser_bound.set_opt(ser);
|
||||||
|
|||||||
Reference in New Issue
Block a user