Simpler way to get single element from vector
This commit is contained in:
parent
a9c5df5da1
commit
aeae265777
@ -120,7 +120,7 @@ impl<'c, T> VecAttr<'c, T> {
|
||||
.error_spanned_by(dup_token, format!("duplicate serde attribute `{}`", self.name));
|
||||
Err(())
|
||||
} else {
|
||||
Ok(self.values.drain(..).next())
|
||||
Ok(self.values.pop())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user