mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 02:07:56 +00:00
Merge pull request #3019 from xibeiyoumian/master
chore: improve code comments clarity
This commit is contained in:
@@ -11,7 +11,7 @@ struct T0(u8, u8);
|
||||
struct T1(u8, #[serde(default)] u8);
|
||||
|
||||
// ERROR: The first field can get default value only if sequence is empty, but
|
||||
// that mean that all other fields cannot be deserialized without errors.
|
||||
// that means that all other fields cannot be deserialized without errors.
|
||||
#[derive(Deserialize)]
|
||||
struct T2(#[serde(default)] u8, u8, u8);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ fn d<T>() -> T {
|
||||
struct T1(u8, #[serde(default = "d")] u8);
|
||||
|
||||
// ERROR: The first field can get default value only if sequence is empty, but
|
||||
// that mean that all other fields cannot be deserialized without errors.
|
||||
// that means that all other fields cannot be deserialized without errors.
|
||||
#[derive(Deserialize)]
|
||||
struct T2(#[serde(default = "d")] u8, u8, u8);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user