Skip to content

Commit

Permalink
Update nuid crate to 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini authored and Jarema committed Aug 11, 2023
1 parent b26262b commit 0a80d9f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion async-nats/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ itoa = "1"
url = { version = "2"}
tokio-rustls = "0.24"
rustls-pemfile = "1.0.2"
nuid = "0.4.1"
nuid = "0.5"
serde_nanos = "0.1.3"
time = { version = "0.3.24", features = ["parsing", "formatting", "serde", "serde-well-known"] }
rustls-native-certs = "0.6"
Expand Down
2 changes: 1 addition & 1 deletion async-nats/src/jetstream/object_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ impl ObjectStore {
description: object_meta.description,
link: None,
bucket: self.name.clone(),
nuid: object_nuid,
nuid: object_nuid.to_string(),
chunks: object_chunks,
size: object_size,
digest: Some(format!("SHA-256={}", URL_SAFE.encode(digest))),
Expand Down
2 changes: 1 addition & 1 deletion async-nats/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl Service {
"service name is not a valid string (only A-Z, a-z, 0-9, _, - are allowed)",
)));
}
let id = nuid::next();
let id = nuid::next().to_string();
let started = time::OffsetDateTime::now_utc();
let subjects = Arc::new(Mutex::new(Vec::new()));
let info = Info {
Expand Down
2 changes: 1 addition & 1 deletion nats-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ lazy_static = "1.4.0"
regex = { version = "1.7.1", default-features = false, features = ["std", "unicode-perl"] }
url = "2"
json = "0.12"
nuid = "0.4.1"
nuid = "0.5"
rand = "0.8"
tokio-retry = "0.3.0"

Expand Down
6 changes: 3 additions & 3 deletions nats-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub fn run_server_with_port(cfg: &str, port: Option<&str>) -> Server {
}

fn do_run(cfg: &str, port: Option<&str>, id: Option<String>) -> Inner {
let id = id.unwrap_or_else(nuid::next);
let id = id.unwrap_or_else(|| nuid::next().to_string());
let logfile = env::temp_dir().join(format!("nats-server-{id}.log"));
let pidfile = env::temp_dir().join(format!("nats-server-{id}.pid"));
let store_dir = env::temp_dir().join(format!("store-dir-{id}"));
Expand Down Expand Up @@ -268,7 +268,7 @@ fn do_run(cfg: &str, port: Option<&str>, id: Option<String>) -> Inner {
Inner {
port: port.map(ToString::to_string),
cfg: cfg.to_string(),
id,
id: id.to_string(),
child,
logfile,
pidfile,
Expand Down Expand Up @@ -327,7 +327,7 @@ fn run_cluster_node_with_port(
inner: Inner {
port: port.map(ToString::to_string),
cfg: cfg.to_string(),
id,
id: id.to_string(),
child,
logfile,
pidfile,
Expand Down

0 comments on commit 0a80d9f

Please sign in to comment.