Skip to content

Commit

Permalink
Update rust version (#1951)
Browse files Browse the repository at this point in the history
* Update rust version

* Fix clippy complaints

---------

Co-authored-by: gix-bot <[email protected]>
Co-authored-by: Frederik Rothenberger <[email protected]>
  • Loading branch information
3 people authored Oct 6, 2023
1 parent ffb63dd commit 0ad1167
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.72.1"
channel = "1.73.0"
targets = ["wasm32-unknown-unknown"]
2 changes: 1 addition & 1 deletion src/internet_identity/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ fn stats() -> InternetIdentityStats {
.map(|latest_delegation_origins| {
latest_delegation_origins.keys().cloned().collect()
})
.unwrap_or(vec![]);
.unwrap_or_default();
(
origins,
persistent_state.max_num_latest_delegation_origins.unwrap(),
Expand Down
3 changes: 1 addition & 2 deletions src/internet_identity/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,7 @@ impl<M: Memory + Clone> Storage<M> {
.map_err(PersistentStateError::ReadError)?;

let size = u64::from_le_bytes(size_buf);
let mut data_buf = Vec::new();
data_buf.resize(size as usize, 0);
let mut data_buf = vec![0; size as usize];
reader
.read_exact(data_buf.as_mut_slice())
.map_err(PersistentStateError::ReadError)?;
Expand Down

0 comments on commit 0ad1167

Please sign in to comment.