Remove `cachedir` dependency (#11240)

## Summary

Vendor the `HEADER` constant too so we can eliminate the dependency on
`cachedir`.
This commit is contained in:
Jo 2025-02-05 21:54:02 +08:00 committed by GitHub
parent ee2bdc21fa
commit 6f8d9b85d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 2 additions and 13 deletions

10
Cargo.lock generated
View File

@ -473,15 +473,6 @@ dependencies = [
"pkg-config", "pkg-config",
] ]
[[package]]
name = "cachedir"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4703f3937077db8fa35bee3c8789343c1aec2585f0146f09d658d4ccc0e8d873"
dependencies = [
"tempfile",
]
[[package]] [[package]]
name = "camino" name = "camino"
version = "1.1.9" version = "1.1.9"
@ -5085,7 +5076,6 @@ name = "uv-fs"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"backon", "backon",
"cachedir",
"dunce", "dunce",
"either", "either",
"encoding_rs_io", "encoding_rs_io",

View File

@ -85,7 +85,6 @@ base64 = { version = "0.22.1" }
bitflags = { version = "2.6.0" } bitflags = { version = "2.6.0" }
boxcar = { version = "0.2.5" } boxcar = { version = "0.2.5" }
bytecheck = { version = "0.8.0" } bytecheck = { version = "0.8.0" }
cachedir = { version = "0.3.1" }
cargo-util = { version = "0.2.14" } cargo-util = { version = "0.2.14" }
clap = { version = "4.5.17", features = ["derive", "env", "string", "wrap_help"] } clap = { version = "4.5.17", features = ["derive", "env", "string", "wrap_help"] }
clap_complete_command = { version = "0.6.1" } clap_complete_command = { version = "0.6.1" }

View File

@ -16,7 +16,6 @@ doctest = false
workspace = true workspace = true
[dependencies] [dependencies]
cachedir = { workspace = true }
dunce = { workspace = true } dunce = { workspace = true }
either = { workspace = true } either = { workspace = true }
encoding_rs_io = { workspace = true } encoding_rs_io = { workspace = true }

View File

@ -3,7 +3,8 @@
use std::io::Write; use std::io::Write;
use std::{io, path}; use std::{io, path};
use cachedir::HEADER; /// The `CACHEDIR.TAG` file header as defined by the [specification](https://bford.info/cachedir/).
const HEADER: &[u8; 43] = b"Signature: 8a477f597d28d172789f06886806bc55";
/// Adds a tag to the specified `directory`. /// Adds a tag to the specified `directory`.
/// ///