Skip to content

Commit

Permalink
feat: Fix StateDelta byte slice access in freenet_api
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Dec 23, 2024
1 parent 4bf5b42 commit 8c10c17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/components/app/freenet_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl FreenetApiSynchronizer {
let mut rooms = rooms.write();
let key_bytes: [u8; 32] = key.id().as_bytes().try_into().expect("Invalid key length");
if let Some(room_data) = rooms.map.get_mut(&VerifyingKey::from_bytes(&key_bytes).expect("Invalid key bytes")) {
if let Ok(delta) = ciborium::from_reader(update.unwrap_delta().as_slice()) {
if let Ok(delta) = ciborium::from_reader(update.unwrap_delta().as_ref()) {
if let Err(e) = room_data.room_state.apply_delta(
&room_data.room_state,
&room_data.parameters(),
Expand Down

0 comments on commit 8c10c17

Please sign in to comment.