mirror of
https://github.com/fluencelabs/interface-types
synced 2024-12-04 15:20:20 +00:00
feat(interface-types) Use Vec::last_mut
to simplify code.
This commit is contained in:
parent
3426921a8b
commit
d184ddbe37
@ -79,9 +79,7 @@ impl Serializer {
|
||||
}
|
||||
|
||||
fn last(&mut self) -> &mut Vec<InterfaceValue> {
|
||||
let index = self.values.len() - 1;
|
||||
|
||||
&mut self.values[index]
|
||||
self.values.last_mut().unwrap()
|
||||
}
|
||||
|
||||
fn push_with_capacity(&mut self, capacity: usize) {
|
||||
|
Loading…
Reference in New Issue
Block a user