Skip to content

Commit 9ff5a8b

Browse files
committed
Changed vertex id size to 128bits
1 parent 10b876a commit 9ff5a8b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "graphlib"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
authors = ["Octavian Oncescu <[email protected]>"]
55
edition = "2018"
66
repository = "https://github.com/purpleprotocol/graphlib"

src/vertex_id.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
use rand::Rng;
44

55
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
6-
pub struct VertexId([u8; 12]);
6+
pub struct VertexId([u8; 16]); // 128bit
77

88
impl VertexId {
99
pub fn random() -> VertexId {
10-
let bytes = rand::thread_rng().gen::<[u8; 12]>();
10+
let bytes = rand::thread_rng().gen::<[u8; 16]>();
1111
VertexId(bytes)
1212
}
1313
}

0 commit comments

Comments
 (0)