Skip to content

Commit

Permalink
Merge pull request #19 from zksecurity/replace-lazylock
Browse files Browse the repository at this point in the history
Replace LazyLock
  • Loading branch information
mellowcroc authored Oct 15, 2024
2 parents 41fddfa + 62cc5a6 commit 80d0148
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ uuid = "1.9.1"

[build-dependencies]
flate2 = "1.0.30"
once_cell = "1.18"
reqwest = { version = "0.12.5", features = ["blocking"] }
serde = { version = "1.0", features = ["derive"], default-features = false }
serde_json = "1"
Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
use once_cell::sync::Lazy;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::env::consts::{ARCH, OS};
use std::ffi::OsStr;
use std::fs::{metadata, remove_file, set_permissions};
use std::os::unix::fs::PermissionsExt;
use std::path::Path;
use std::sync::LazyLock;
use thiserror::Error;

const CONFIG: &str = include_str!("configs/env.json");

static DISTS: LazyLock<HashMap<(Os, Arch), Artifacts>> = LazyLock::new(|| {
static DISTS: Lazy<HashMap<(Os, Arch), Artifacts>> = Lazy::new(|| {
let mut m = HashMap::new();
m.insert((Os::Linux, Arch::Amd64), Artifacts {
url: "https://github.com/zksecurity/stone-cli/releases/download/v0.1.0-alpha/stone-cli-linux-x86_64.tar.gz".to_string(),
Expand Down

0 comments on commit 80d0148

Please sign in to comment.