Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
bug(allocate once, not thrice) (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
laser authored Jun 20, 2019
1 parent c08e744 commit cc6bae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sector-builder/src/helpers/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn load_snapshot<T: KeyValueStore>(
impl From<&SnapshotKey> for Vec<u8> {
fn from(n: &SnapshotKey) -> Self {
// convert the sector size to a byte vector
let mut snapshot_key = vec![];
let mut snapshot_key = Vec::with_capacity(n.prover_id.len() + 8);
snapshot_key
.write_u64::<LittleEndian>(u64::from(n.sector_size))
.unwrap();
Expand Down

0 comments on commit cc6bae3

Please sign in to comment.