Skip to content

Commit

Permalink
Merge pull request #3 from Eijebong/update-deps
Browse files Browse the repository at this point in the history
Update dependencies and bump version
  • Loading branch information
lotas authored Sep 13, 2024
2 parents ef7a109 + 39af7e9 commit 14f8f4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "slugid"
version = "1.0.1"
version = "1.0.2"
authors = ["Wander Lairson Costa <[email protected]>", "Dustin J. Mitchell <[email protected]>"]
license = "MPL-2.0"
description = "SlugId generation for Rust"
Expand All @@ -10,6 +10,6 @@ documentation = "https://docs.rs/slugid/"
edition = "2018"

[dependencies]
ring = { version = "0.16.15" }
base64 = { version = "0.13" }
base64 = "0.22.1"
lazy_static = { version = "1.4.0" }
ring = "0.17.8"
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! entropy that for all practical purposes they can be considered unique.
//!
//! See https://github.com/taskcluster/slugid for details.
use base64;
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
use lazy_static::lazy_static;
use ring::rand::{SecureRandom, SystemRandom};

Expand All @@ -27,7 +27,7 @@ fn uuid_v4(rng: &dyn SecureRandom) -> [u8; 16] {
/// Encode a UUID as a slugid (base64, url-safe, without padding)
#[inline(always)]
fn encode(bytes: &[u8; 16]) -> String {
base64::encode_config(bytes, base64::URL_SAFE_NO_PAD)
URL_SAFE_NO_PAD.encode(bytes)
}

/// Like `v4` but accepting a ring rng as a source of randomness.
Expand Down

0 comments on commit 14f8f4d

Please sign in to comment.