Rename flock to fs-lock (#338)

This commit is contained in:
Félix Saparelli 2022-09-05 03:28:22 +12:00 committed by GitHub
parent 3387a63895
commit a628cbf876
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 16 additions and 16 deletions

View file

@ -11,7 +11,7 @@ on:
- lib - lib
- detect-targets - detect-targets
- detect-wasi - detect-wasi
- flock - fs-lock
- normalize-path - normalize-path
version: version:
description: Version to release description: Version to release

16
Cargo.lock generated
View file

@ -90,7 +90,7 @@ dependencies = [
"digest", "digest",
"env_logger", "env_logger",
"flate2", "flate2",
"flock", "fs-lock",
"futures-util", "futures-util",
"generic-array", "generic-array",
"home", "home",
@ -530,13 +530,6 @@ dependencies = [
"miniz_oxide", "miniz_oxide",
] ]
[[package]]
name = "flock"
version = "0.0.0"
dependencies = [
"fs4",
]
[[package]] [[package]]
name = "fnv" name = "fnv"
version = "1.0.7" version = "1.0.7"
@ -568,6 +561,13 @@ dependencies = [
"percent-encoding", "percent-encoding",
] ]
[[package]]
name = "fs-lock"
version = "0.0.0"
dependencies = [
"fs4",
]
[[package]] [[package]]
name = "fs4" name = "fs4"
version = "0.6.2" version = "0.6.2"

View file

@ -3,7 +3,7 @@ members = [
"crates/bin", "crates/bin",
"crates/lib", "crates/lib",
"crates/detect-wasi", "crates/detect-wasi",
"crates/flock", "crates/fs-lock",
"crates/normalize-path", "crates/normalize-path",
"crates/detect-targets", "crates/detect-targets",
] ]

View file

@ -1,8 +1,8 @@
[package] [package]
name = "flock" name = "fs-lock"
description = "Locked files that can be used like normal File" description = "Locked files that can be used like normal File"
repository = "https://github.com/cargo-bins/cargo-binstall" repository = "https://github.com/cargo-bins/cargo-binstall"
documentation = "https://docs.rs/flock" documentation = "https://docs.rs/fs-lock"
version = "0.0.0" version = "0.0.0"
rust-version = "1.61.0" rust-version = "1.61.0"
authors = ["Jiahao XU <Jiahao_XU@outlook.com>"] authors = ["Jiahao XU <Jiahao_XU@outlook.com>"]

View file

@ -20,7 +20,7 @@ crates_io_api = { version = "0.8.0", default-features = false }
detect-targets = { version = "0.1.0", path = "../detect-targets" } detect-targets = { version = "0.1.0", path = "../detect-targets" }
digest = "0.10.3" digest = "0.10.3"
flate2 = { version = "1.0.24", default-features = false } flate2 = { version = "1.0.24", default-features = false }
flock = { version = "0.0.0", path = "../flock" } fs-lock = { version = "0.0.0", path = "../fs-lock" }
futures-util = { version = "0.3.23", default-features = false, features = ["std"] } futures-util = { version = "0.3.23", default-features = false, features = ["std"] }
generic-array = "0.14.6" generic-array = "0.14.6"
home = "0.5.3" home = "0.5.3"

View file

@ -143,7 +143,7 @@ impl super::Fetcher for GhCrateMeta {
} }
async fn fetch_and_extract(&self, dst: &Path) -> Result<(), BinstallError> { async fn fetch_and_extract(&self, dst: &Path) -> Result<(), BinstallError> {
let (url, pkg_fmt) = self.resolution.get().unwrap(); // find() is called first let (url, _pkg_fmt) = self.resolution.get().unwrap(); // find() is called first
debug!("Downloading package from: '{url}'"); debug!("Downloading package from: '{url}'");
Download::new(self.client.clone(), url.clone()) Download::new(self.client.clone(), url.clone())
.and_extract(self.pkg_fmt(), dst) .and_extract(self.pkg_fmt(), dst)

View file

@ -14,7 +14,7 @@ use std::{
path::{Path, PathBuf}, path::{Path, PathBuf},
}; };
use flock::FileLock; use fs_lock::FileLock;
use miette::Diagnostic; use miette::Diagnostic;
use serde::Serialize; use serde::Serialize;
use thiserror::Error; use thiserror::Error;

View file

@ -16,7 +16,7 @@ use std::{
}; };
use compact_str::CompactString; use compact_str::CompactString;
use flock::FileLock; use fs_lock::FileLock;
use miette::Diagnostic; use miette::Diagnostic;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use thiserror::Error; use thiserror::Error;