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

View file

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

View file

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