Skip to content

Commit 295d860

Browse files
authored
Merge pull request #648 from swimos/dependabot/cargo/integer-encoding-4.0.0
Update integer-encoding requirement from 3.0.4 to 4.0.0
2 parents 362da99 + 04064b2 commit 295d860

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ ratchet_fixture = "0.4"
9393
flate2 = "1.0.22"
9494
bitflags = "2.5"
9595
rocksdb = "0.22"
96-
integer-encoding = "3.0.4"
96+
integer-encoding = "4.0.0"
9797
rustls = "0.20"
9898
webpki = "0.22"
9999
webpki-roots = "0.22"

runtime/swimos_rocks_store/src/server/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,17 @@ impl StoreKey {
199199
match self {
200200
StoreKey::Map { lane_id, key } => {
201201
writer.write_all(&[MAP_TAG])?;
202-
writer.write_all(lane_id.encode_fixed_light())?;
202+
writer.write_all(&lane_id.encode_fixed_light())?;
203203
if let Some(key) = key {
204204
writer.write_all(&[KEY])?;
205205
let len = u64::try_from(key.len()).expect("Length does not fit into u64");
206-
writer.write_all(len.encode_fixed_light())?;
206+
writer.write_all(&len.encode_fixed_light())?;
207207
writer.write_all(key)?;
208208
}
209209
}
210210
StoreKey::Value { lane_id } => {
211211
writer.write_all(&[VAL_TAG])?;
212-
writer.write_all(lane_id.encode_fixed_light())?;
212+
writer.write_all(&lane_id.encode_fixed_light())?;
213213
}
214214
}
215215
Ok(())
@@ -238,7 +238,7 @@ impl StoreKey {
238238
W: Write,
239239
{
240240
writer.write_all(&[MAP_TAG])?;
241-
writer.write_all(lane_id.encode_fixed_light())?;
241+
writer.write_all(&lane_id.encode_fixed_light())?;
242242
writer.write_all(&[UBOUND])?;
243243
Ok(())
244244
}

runtime/swimos_rocks_store/src/server/tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn serialize_value_key() {
2424
assert_eq!(bytes.len(), 9);
2525
assert_eq!(bytes[0], VAL_TAG);
2626

27-
assert_eq!(u64::decode_fixed(&bytes[1..]), lane_id)
27+
assert_eq!(u64::decode_fixed(&bytes[1..]), Some(lane_id))
2828
}
2929

3030
#[test]
@@ -40,9 +40,9 @@ fn serialize_map_key() {
4040
assert_eq!(bytes.len(), 26);
4141
assert_eq!(bytes[0], MAP_TAG);
4242

43-
assert_eq!(u64::decode_fixed(&bytes[1..9]), lane_id);
43+
assert_eq!(u64::decode_fixed(&bytes[1..9]), Some(lane_id));
4444
assert_eq!(bytes[9], KEY);
45-
assert_eq!(u64::decode_fixed(&bytes[10..18]), 8);
45+
assert_eq!(u64::decode_fixed(&bytes[10..18]), Some(8));
4646

4747
assert_eq!(&bytes[18..], key_bytes);
4848
}
@@ -56,7 +56,7 @@ fn serialize_map_lbound() {
5656
assert_eq!(bytes.len(), 9);
5757
assert_eq!(bytes[0], MAP_TAG);
5858

59-
assert_eq!(u64::decode_fixed(&bytes[1..9]), lane_id);
59+
assert_eq!(u64::decode_fixed(&bytes[1..9]), Some(lane_id));
6060
}
6161

6262
#[test]
@@ -67,6 +67,6 @@ fn serialize_map_ubound() {
6767
assert_eq!(bytes.len(), 10);
6868
assert_eq!(bytes[0], MAP_TAG);
6969

70-
assert_eq!(u64::decode_fixed(&bytes[1..9]), lane_id);
70+
assert_eq!(u64::decode_fixed(&bytes[1..9]), Some(lane_id));
7171
assert_eq!(bytes[9], UBOUND);
7272
}

0 commit comments

Comments
 (0)