Skip to content

Commit

Permalink
Changed vertex id size to 128bits
Browse files Browse the repository at this point in the history
  • Loading branch information
octavonce committed Mar 16, 2019
1 parent 10b876a commit 9ff5a8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "graphlib"
version = "0.1.2"
version = "0.1.3"
authors = ["Octavian Oncescu <octavonce@gmail.com>"]
edition = "2018"
repository = "https://github.com/purpleprotocol/graphlib"
Expand Down
4 changes: 2 additions & 2 deletions src/vertex_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
use rand::Rng;

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

impl VertexId {
pub fn random() -> VertexId {
let bytes = rand::thread_rng().gen::<[u8; 12]>();
let bytes = rand::thread_rng().gen::<[u8; 16]>();
VertexId(bytes)
}
}

0 comments on commit 9ff5a8b

Please sign in to comment.