build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group (#1817)

* build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group

Bumps the deps group with 1 update: [compact_str](https://github.com/ParkMyCar/compact_str).


Updates `compact_str` from 0.7.1 to 0.8.0
- [Changelog](https://github.com/ParkMyCar/compact_str/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ParkMyCar/compact_str/commits)

---
updated-dependencies:
- dependency-name: compact_str
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix compilation error and deprecations

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Use `CompactString::const_new` when possible

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
dependabot[bot] 2024-07-13 14:10:11 +10:00 committed by GitHub
parent a92ad4952f
commit 0fe605f7f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 45 additions and 58 deletions

37
Cargo.lock generated
View file

@ -257,7 +257,7 @@ dependencies = [
"binstalk-types", "binstalk-types",
"cargo-toml-workspace", "cargo-toml-workspace",
"command-group", "command-group",
"compact_str 0.7.1", "compact_str",
"detect-targets", "detect-targets",
"either", "either",
"itertools", "itertools",
@ -283,7 +283,7 @@ version = "0.4.0"
dependencies = [ dependencies = [
"atomic-file-install", "atomic-file-install",
"binstalk-types", "binstalk-types",
"compact_str 0.7.1", "compact_str",
"leon", "leon",
"miette", "miette",
"normalize-path", "normalize-path",
@ -302,7 +302,7 @@ dependencies = [
"binstall-tar", "binstall-tar",
"bytes", "bytes",
"bzip2", "bzip2",
"compact_str 0.7.1", "compact_str",
"default-net", "default-net",
"flate2", "flate2",
"futures-io", "futures-io",
@ -334,7 +334,7 @@ dependencies = [
"binstalk-git-repo-api", "binstalk-git-repo-api",
"binstalk-types", "binstalk-types",
"bytes", "bytes",
"compact_str 0.7.1", "compact_str",
"either", "either",
"itertools", "itertools",
"leon", "leon",
@ -354,7 +354,7 @@ name = "binstalk-git-repo-api"
version = "0.3.0" version = "0.3.0"
dependencies = [ dependencies = [
"binstalk-downloader", "binstalk-downloader",
"compact_str 0.7.1", "compact_str",
"once_cell", "once_cell",
"percent-encoding", "percent-encoding",
"serde", "serde",
@ -374,7 +374,7 @@ version = "0.13.0"
dependencies = [ dependencies = [
"beef", "beef",
"binstalk-types", "binstalk-types",
"compact_str 0.7.1", "compact_str",
"detect-targets", "detect-targets",
"fs-lock", "fs-lock",
"home", "home",
@ -398,7 +398,7 @@ dependencies = [
"binstalk-downloader", "binstalk-downloader",
"binstalk-types", "binstalk-types",
"cargo-toml-workspace", "cargo-toml-workspace",
"compact_str 0.7.1", "compact_str",
"leon", "leon",
"miette", "miette",
"normalize-path", "normalize-path",
@ -420,7 +420,7 @@ dependencies = [
name = "binstalk-types" name = "binstalk-types"
version = "0.7.0" version = "0.7.0"
dependencies = [ dependencies = [
"compact_str 0.7.1", "compact_str",
"maybe-owned", "maybe-owned",
"once_cell", "once_cell",
"semver", "semver",
@ -555,7 +555,7 @@ dependencies = [
"binstalk", "binstalk",
"binstalk-manifests", "binstalk-manifests",
"clap", "clap",
"compact_str 0.7.1", "compact_str",
"dirs", "dirs",
"embed-resource", "embed-resource",
"file-format", "file-format",
@ -592,7 +592,7 @@ name = "cargo-toml-workspace"
version = "6.0.0" version = "6.0.0"
dependencies = [ dependencies = [
"cargo_toml", "cargo_toml",
"compact_str 0.7.1", "compact_str",
"glob", "glob",
"normalize-path", "normalize-path",
"serde", "serde",
@ -724,20 +724,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "compact_str"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f"
dependencies = [
"castaway",
"cfg-if",
"itoa",
"ryu",
"serde",
"static_assertions",
]
[[package]] [[package]]
name = "compact_str" name = "compact_str"
version = "0.8.0" version = "0.8.0"
@ -749,6 +735,7 @@ dependencies = [
"itoa", "itoa",
"rustversion", "rustversion",
"ryu", "ryu",
"serde",
"static_assertions", "static_assertions",
] ]
@ -3735,7 +3722,7 @@ version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48955a621e2b4a92fdb9fcbf8a5bf0e56b15a56bfe09e6defc01cb25ca59f31c" checksum = "48955a621e2b4a92fdb9fcbf8a5bf0e56b15a56bfe09e6defc01cb25ca59f31c"
dependencies = [ dependencies = [
"compact_str 0.8.0", "compact_str",
"derive_destructure2", "derive_destructure2",
"gix", "gix",
"thiserror", "thiserror",

View file

@ -25,7 +25,7 @@ pkg-fmt = "zip"
binstalk = { path = "../binstalk", version = "0.26.1", default-features = false } binstalk = { path = "../binstalk", version = "0.26.1", default-features = false }
binstalk-manifests = { path = "../binstalk-manifests", version = "0.13.0" } binstalk-manifests = { path = "../binstalk-manifests", version = "0.13.0" }
clap = { version = "4.5.3", features = ["derive", "env"] } clap = { version = "4.5.3", features = ["derive", "env"] }
compact_str = "0.7.0" compact_str = "0.8.0"
dirs = "5.0.1" dirs = "5.0.1"
file-format = { version = "0.25.0", default-features = false } file-format = { version = "0.25.0", default-features = false }
home = "0.5.9" home = "0.5.9"

View file

@ -13,7 +13,7 @@ license = "GPL-3.0-only"
[dependencies] [dependencies]
atomic-file-install = { version = "1.0.5", path = "../atomic-file-install" } atomic-file-install = { version = "1.0.5", path = "../atomic-file-install" }
binstalk-types = { version = "0.7.0", path = "../binstalk-types" } binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
compact_str = { version = "0.7.0", features = ["serde"] } compact_str = { version = "0.8.0", features = ["serde"] }
leon = "3.0.0" leon = "3.0.0"
miette = "7.0.0" miette = "7.0.0"
normalize-path = { version = "0.2.1", path = "../normalize-path" } normalize-path = { version = "0.2.1", path = "../normalize-path" }

View file

@ -30,7 +30,7 @@ async_zip = { version = "0.0.17", features = [
binstalk-types = { version = "0.7.0", path = "../binstalk-types" } binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
bytes = "1.4.0" bytes = "1.4.0"
bzip2 = "0.4.4" bzip2 = "0.4.4"
compact_str = "0.7.0" compact_str = "0.8.0"
flate2 = { version = "1.0.28", default-features = false } flate2 = { version = "1.0.28", default-features = false }
futures-util = "0.3.30" futures-util = "0.3.30"
futures-io = "0.3.30" futures-io = "0.3.30"

View file

@ -16,7 +16,7 @@ binstalk-downloader = { version = "0.11.5", path = "../binstalk-downloader", def
binstalk-git-repo-api = { version = "0.3.0", path = "../binstalk-git-repo-api" } binstalk-git-repo-api = { version = "0.3.0", path = "../binstalk-git-repo-api" }
binstalk-types = { version = "0.7.0", path = "../binstalk-types" } binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
bytes = "1.4.0" bytes = "1.4.0"
compact_str = { version = "0.7.0" } compact_str = { version = "0.8.0" }
either = "1.11.0" either = "1.11.0"
itertools = "0.13.0" itertools = "0.13.0"
leon = "3.0.0" leon = "3.0.0"

View file

@ -13,7 +13,7 @@ license = "Apache-2.0 OR MIT"
binstalk-downloader = { version = "0.11.5", path = "../binstalk-downloader", default-features = false, features = [ binstalk-downloader = { version = "0.11.5", path = "../binstalk-downloader", default-features = false, features = [
"json", "json",
] } ] }
compact_str = "0.7.0" compact_str = "0.8.0"
percent-encoding = "2.2.0" percent-encoding = "2.2.0"
serde = { version = "1.0.163", features = ["derive"] } serde = { version = "1.0.163", features = ["derive"] }
serde-tuple-vec-map = "1.0.1" serde-tuple-vec-map = "1.0.1"

View file

@ -338,10 +338,10 @@ mod test {
pub(super) const RELEASE: GhRelease = GhRelease { pub(super) const RELEASE: GhRelease = GhRelease {
repo: GhRepo { repo: GhRepo {
owner: CompactString::new_inline("cargo-bins"), owner: CompactString::const_new("cargo-bins"),
repo: CompactString::new_inline("cargo-binstall"), repo: CompactString::const_new("cargo-binstall"),
}, },
tag: CompactString::new_inline("v0.20.1"), tag: CompactString::const_new("v0.20.1"),
}; };
pub(super) const ARTIFACTS: &[&str] = &[ pub(super) const ARTIFACTS: &[&str] = &[
@ -375,10 +375,10 @@ mod test {
pub(super) const RELEASE: GhRelease = GhRelease { pub(super) const RELEASE: GhRelease = GhRelease {
repo: GhRepo { repo: GhRepo {
owner: CompactString::new_inline("rustsec"), owner: CompactString::const_new("rustsec"),
repo: CompactString::new_inline("rustsec"), repo: CompactString::const_new("rustsec"),
}, },
tag: CompactString::new_inline("cargo-audit/v0.17.6"), tag: CompactString::const_new("cargo-audit/v0.17.6"),
}; };
#[allow(unused)] #[allow(unused)]
@ -417,7 +417,7 @@ mod test {
] ]
.into_iter() .into_iter()
.for_each(|url| { .for_each(|url| {
let url = Url::parse(&url).unwrap(); let url = Url::parse(url).unwrap();
assert_eq!( assert_eq!(
GhRepo::try_extract_from_url(&url) GhRepo::try_extract_from_url(&url)
.unwrap() .unwrap()
@ -545,16 +545,16 @@ mod test {
#[tokio::test] #[tokio::test]
async fn rate_limited_test_get_repo_info() { async fn rate_limited_test_get_repo_info() {
const PUBLIC_REPOS: [GhRepo; 1] = [GhRepo { const PUBLIC_REPOS: [GhRepo; 1] = [GhRepo {
owner: CompactString::new_inline("cargo-bins"), owner: CompactString::const_new("cargo-bins"),
repo: CompactString::new_inline("cargo-binstall"), repo: CompactString::const_new("cargo-binstall"),
}]; }];
const PRIVATE_REPOS: [GhRepo; 1] = [GhRepo { const PRIVATE_REPOS: [GhRepo; 1] = [GhRepo {
owner: CompactString::new_inline("cargo-bins"), owner: CompactString::const_new("cargo-bins"),
repo: CompactString::new_inline("private-repo-for-testing"), repo: CompactString::const_new("private-repo-for-testing"),
}]; }];
const NON_EXISTENT_REPOS: [GhRepo; 1] = [GhRepo { const NON_EXISTENT_REPOS: [GhRepo; 1] = [GhRepo {
owner: CompactString::new_inline("cargo-bins"), owner: CompactString::const_new("cargo-bins"),
repo: CompactString::new_inline("ttt"), repo: CompactString::const_new("ttt"),
}]; }];
init_logger(); init_logger();
@ -610,12 +610,12 @@ mod test {
)]; )];
const NON_EXISTENT_RELEASES: [GhRelease; 1] = [GhRelease { const NON_EXISTENT_RELEASES: [GhRelease; 1] = [GhRelease {
repo: GhRepo { repo: GhRepo {
owner: CompactString::new_inline("cargo-bins"), owner: CompactString::const_new("cargo-bins"),
repo: CompactString::new_inline("cargo-binstall"), repo: CompactString::const_new("cargo-binstall"),
}, },
// We are currently at v0.20.1 and we would never release // We are currently at v0.20.1 and we would never release
// anything older than v0.20.1 // anything older than v0.20.1
tag: CompactString::new_inline("v0.18.2"), tag: CompactString::const_new("v0.18.2"),
}]; }];
init_logger(); init_logger();

View file

@ -197,7 +197,7 @@ mod test {
assert_matches!(deserialize("RATE_LIMITED"), GraphQLErrorType::RateLimited); assert_matches!(deserialize("RATE_LIMITED"), GraphQLErrorType::RateLimited);
assert_matches!( assert_matches!(
deserialize("rATE_LIMITED"), deserialize("rATE_LIMITED"),
GraphQLErrorType::Other(val) if val == CompactString::new("rATE_LIMITED") GraphQLErrorType::Other(val) if val == CompactString::const_new("rATE_LIMITED")
); );
} }
} }

View file

@ -12,7 +12,7 @@ license = "Apache-2.0 OR MIT"
[dependencies] [dependencies]
beef = { version = "0.5.2", features = ["impl_serde"] } beef = { version = "0.5.2", features = ["impl_serde"] }
binstalk-types = { version = "0.7.0", path = "../binstalk-types" } binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
compact_str = { version = "0.7.0", features = ["serde"] } compact_str = { version = "0.8.0", features = ["serde"] }
fs-lock = { version = "0.1.3", path = "../fs-lock" } fs-lock = { version = "0.1.3", path = "../fs-lock" }
home = "0.5.9" home = "0.5.9"
miette = "7.0.0" miette = "7.0.0"

View file

@ -210,7 +210,7 @@ root = "/some/path" # `cargo install` destination directory
); );
let http = config.http.unwrap(); let http = config.http.unwrap();
assert_eq!(http.proxy.unwrap(), CompactString::new_inline("host:port")); assert_eq!(http.proxy.unwrap(), CompactString::const_new("host:port"));
assert_eq!(http.timeout.unwrap(), 30); assert_eq!(http.timeout.unwrap(), 30);
assert_eq!(http.cainfo.unwrap(), Path::new("root").join("cert.pem")); assert_eq!(http.cainfo.unwrap(), Path::new("root").join("cert.pem"));
@ -218,7 +218,7 @@ root = "/some/path" # `cargo install` destination directory
assert_eq!(env.len(), 3); assert_eq!(env.len(), 3);
assert_eq!( assert_eq!(
env.get("ENV_VAR_NAME").unwrap(), env.get("ENV_VAR_NAME").unwrap(),
&Env::Value(CompactString::new("value")) &Env::Value(CompactString::const_new("value"))
); );
assert_eq!( assert_eq!(
env.get("ENV_VAR_NAME_2").unwrap(), env.get("ENV_VAR_NAME_2").unwrap(),

View file

@ -18,7 +18,7 @@ binstalk-downloader = { version = "0.11.5", path = "../binstalk-downloader", def
] } ] }
binstalk-types = { version = "0.7.0", path = "../binstalk-types" } binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
cargo-toml-workspace = { version = "6.0.0", path = "../cargo-toml-workspace" } cargo-toml-workspace = { version = "6.0.0", path = "../cargo-toml-workspace" }
compact_str = { version = "0.7.0", features = ["serde"] } compact_str = { version = "0.8.0", features = ["serde"] }
leon = "3.0.0" leon = "3.0.0"
miette = "7.0.0" miette = "7.0.0"
normalize-path = { version = "0.2.1", path = "../normalize-path" } normalize-path = { version = "0.2.1", path = "../normalize-path" }

View file

@ -96,10 +96,10 @@ pub(super) fn crate_prefix_components(
match (chars.next(), chars.next(), chars.next(), chars.next()) { match (chars.next(), chars.next(), chars.next(), chars.next()) {
(None, None, None, None) => Err(RegistryError::NotFound(crate_name.into())), (None, None, None, None) => Err(RegistryError::NotFound(crate_name.into())),
(Some(_), None, None, None) => Ok((CompactString::new("1"), None)), (Some(_), None, None, None) => Ok((CompactString::const_new("1"), None)),
(Some(_), Some(_), None, None) => Ok((CompactString::new("2"), None)), (Some(_), Some(_), None, None) => Ok((CompactString::const_new("2"), None)),
(Some(ch), Some(_), Some(_), None) => Ok(( (Some(ch), Some(_), Some(_), None) => Ok((
CompactString::new("3"), CompactString::const_new("3"),
Some(ch.to_lowercase().to_compact_string()), Some(ch.to_lowercase().to_compact_string()),
)), )),
(Some(a), Some(b), Some(c), Some(d)) => Ok(( (Some(a), Some(b), Some(c), Some(d)) => Ok((
@ -127,7 +127,7 @@ pub(super) fn render_dl_template(
struct Context<'a> { struct Context<'a> {
crate_name: &'a str, crate_name: &'a str,
crate_prefix: CompactString, crate_prefix: CompactString,
crate_lowerprefix: String, crate_lowerprefix: CompactString,
version: &'a str, version: &'a str,
cksum: &'a str, cksum: &'a str,
} }

View file

@ -10,7 +10,7 @@ edition = "2021"
license = "Apache-2.0 OR MIT" license = "Apache-2.0 OR MIT"
[dependencies] [dependencies]
compact_str = { version = "0.7.0", features = ["serde"] } compact_str = { version = "0.8.0", features = ["serde"] }
maybe-owned = { version = "0.3.4", features = ["serde"] } maybe-owned = { version = "0.3.4", features = ["serde"] }
once_cell = "1.18.0" once_cell = "1.18.0"
semver = { version = "1.0.17", features = ["serde"] } semver = { version = "1.0.17", features = ["serde"] }

View file

@ -20,7 +20,7 @@ binstalk-registry = { version = "0.9.1", path = "../binstalk-registry" }
binstalk-types = { version = "0.7.0", path = "../binstalk-types" } binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
cargo-toml-workspace = { version = "6.0.0", path = "../cargo-toml-workspace" } cargo-toml-workspace = { version = "6.0.0", path = "../cargo-toml-workspace" }
command-group = { version = "5.0.1", features = ["with-tokio"] } command-group = { version = "5.0.1", features = ["with-tokio"] }
compact_str = { version = "0.7.0", features = ["serde"] } compact_str = { version = "0.8.0", features = ["serde"] }
detect-targets = { version = "0.1.17", path = "../detect-targets", features = [ detect-targets = { version = "0.1.17", path = "../detect-targets", features = [
"tracing", "tracing",
] } ] }

View file

@ -11,7 +11,7 @@ license = "Apache-2.0 OR MIT"
[dependencies] [dependencies]
cargo_toml = "0.20.0" cargo_toml = "0.20.0"
compact_str = { version = "0.7.0", features = ["serde"] } compact_str = { version = "0.8.0", features = ["serde"] }
glob = "0.3.1" glob = "0.3.1"
normalize-path = { version = "0.2.1", path = "../normalize-path" } normalize-path = { version = "0.2.1", path = "../normalize-path" }
serde = "1.0.163" serde = "1.0.163"