refactor(tvix/build): remove use of lazy_static
This is now supported in the standard library via std::sync::LazyLock, but requires some manual shuffling around of code. Change-Id: Ie2af74beda9fcf8aa19fca7d844bcbe732f05bf8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12610 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
4beee4cba7
commit
15b5bf2003
4 changed files with 2 additions and 12 deletions
1
tvix/Cargo.lock
generated
1
tvix/Cargo.lock
generated
|
@ -4544,7 +4544,6 @@ dependencies = [
|
||||||
"data-encoding",
|
"data-encoding",
|
||||||
"futures",
|
"futures",
|
||||||
"itertools 0.12.1",
|
"itertools 0.12.1",
|
||||||
"lazy_static",
|
|
||||||
"mimalloc",
|
"mimalloc",
|
||||||
"oci-spec",
|
"oci-spec",
|
||||||
"prost",
|
"prost",
|
||||||
|
|
|
@ -15097,10 +15097,6 @@ rec {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
devDependencies = [
|
devDependencies = [
|
||||||
{
|
|
||||||
name = "lazy_static";
|
|
||||||
packageId = "lazy_static";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "rstest";
|
name = "rstest";
|
||||||
packageId = "rstest";
|
packageId = "rstest";
|
||||||
|
|
|
@ -39,7 +39,6 @@ tonic-reflection = ["dep:tonic-reflection", "tvix-castore/tonic-reflection"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rstest = { workspace = true }
|
rstest = { workspace = true }
|
||||||
lazy_static = "1.4.0"
|
|
||||||
tempfile = "3.3.0"
|
tempfile = "3.3.0"
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
|
|
|
@ -66,20 +66,16 @@ where
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
use super::from_addr;
|
use super::from_addr;
|
||||||
use lazy_static::lazy_static;
|
|
||||||
use rstest::rstest;
|
use rstest::rstest;
|
||||||
|
use std::sync::{Arc, LazyLock};
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
use tvix_castore::{
|
use tvix_castore::{
|
||||||
blobservice::{BlobService, MemoryBlobService},
|
blobservice::{BlobService, MemoryBlobService},
|
||||||
directoryservice::{DirectoryService, MemoryDirectoryService},
|
directoryservice::{DirectoryService, MemoryDirectoryService},
|
||||||
};
|
};
|
||||||
|
|
||||||
lazy_static! {
|
static TMPDIR_OCI_1: LazyLock<TempDir> = LazyLock::new(|| TempDir::new().unwrap());
|
||||||
static ref TMPDIR_OCI_1: TempDir = TempDir::new().unwrap();
|
|
||||||
}
|
|
||||||
|
|
||||||
#[rstest]
|
#[rstest]
|
||||||
/// This uses an unsupported scheme.
|
/// This uses an unsupported scheme.
|
||||||
|
|
Loading…
Reference in a new issue