mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-30 15:28:05 +00:00
Handle repr attribute consistently with every other serde attribute
This commit is contained in:
@@ -583,7 +583,7 @@ impl Container {
|
|||||||
|
|
||||||
let mut is_packed = false;
|
let mut is_packed = false;
|
||||||
for attr in &item.attrs {
|
for attr in &item.attrs {
|
||||||
if attr.path.is_ident("repr") {
|
if attr.path == REPR {
|
||||||
let _ = attr.parse_args_with(|input: ParseStream| {
|
let _ = attr.parse_args_with(|input: ParseStream| {
|
||||||
while let Some(token) = input.parse()? {
|
while let Some(token) = input.parse()? {
|
||||||
if let TokenTree::Ident(ident) = token {
|
if let TokenTree::Ident(ident) = token {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ pub const OTHER: Symbol = Symbol("other");
|
|||||||
pub const REMOTE: Symbol = Symbol("remote");
|
pub const REMOTE: Symbol = Symbol("remote");
|
||||||
pub const RENAME: Symbol = Symbol("rename");
|
pub const RENAME: Symbol = Symbol("rename");
|
||||||
pub const RENAME_ALL: Symbol = Symbol("rename_all");
|
pub const RENAME_ALL: Symbol = Symbol("rename_all");
|
||||||
|
pub const REPR: Symbol = Symbol("repr");
|
||||||
pub const SERDE: Symbol = Symbol("serde");
|
pub const SERDE: Symbol = Symbol("serde");
|
||||||
pub const SERIALIZE: Symbol = Symbol("serialize");
|
pub const SERIALIZE: Symbol = Symbol("serialize");
|
||||||
pub const SERIALIZE_WITH: Symbol = Symbol("serialize_with");
|
pub const SERIALIZE_WITH: Symbol = Symbol("serialize_with");
|
||||||
|
|||||||
Reference in New Issue
Block a user