Skip to content

Commit

Permalink
treat id as u32
Browse files Browse the repository at this point in the history
  • Loading branch information
eaypek-tfh committed Dec 9, 2024
1 parent 1b35abd commit c712190
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iris-mpc-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub use s3_importer::{fetch_and_parse_chunks, last_snapshot_timestamp, ObjectSto
use sqlx::{
migrate::Migrator, postgres::PgPoolOptions, Executor, PgPool, Postgres, Row, Transaction,
};
use std::{ops::DerefMut, pin::Pin};
use std::{ops::DerefMut, pin::Pin, u32};

const APP_NAME: &str = "SMPC";
const MAX_CONNECTIONS: u32 = 100;
Expand Down Expand Up @@ -93,11 +93,11 @@ impl StoredIris {

// Parse `id` (i64)
let id_bytes = extract_slice(bytes, &mut cursor, 4)?;
let id = i64::from_be_bytes(
let id = u32::from_be_bytes(
id_bytes
.try_into()
.map_err(|_| eyre!("Failed to convert id bytes to i64"))?,
);
) as i64;

// parse codes and masks
let left_code = extract_slice(bytes, &mut cursor, 25_600)?;
Expand Down

0 comments on commit c712190

Please sign in to comment.