mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-14 08:11:02 +00:00
Simpler way to get single element from vector
This commit is contained in:
@@ -120,7 +120,7 @@ impl<'c, T> VecAttr<'c, T> {
|
|||||||
.error_spanned_by(dup_token, format!("duplicate serde attribute `{}`", self.name));
|
.error_spanned_by(dup_token, format!("duplicate serde attribute `{}`", self.name));
|
||||||
Err(())
|
Err(())
|
||||||
} else {
|
} else {
|
||||||
Ok(self.values.drain(..).next())
|
Ok(self.values.pop())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user