mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1817900 - Update camino to 1.1.2. r=emilio,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D170428
This commit is contained in:
parent
e69dbc31db
commit
e552674037
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -640,9 +640,9 @@ checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c"
|
||||
|
||||
[[package]]
|
||||
name = "camino"
|
||||
version = "1.1.1"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e"
|
||||
checksum = "c77df041dc383319cc661b428b6961a005db4d6808d5e12536931b1ca9556055"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
@ -273,6 +273,11 @@ who = "Mike Hommey <mh+mozilla@glandium.org>"
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "1.0.9 -> 1.1.1"
|
||||
|
||||
[[audits.camino]]
|
||||
who = "Mike Hommey <mh+mozilla@glandium.org>"
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "1.1.1 -> 1.1.2"
|
||||
|
||||
[[audits.cargo_metadata]]
|
||||
who = "Jan-Erik Rediger <jrediger@mozilla.com>"
|
||||
criteria = "safe-to-deploy"
|
||||
|
2
third_party/rust/camino/.cargo-checksum.json
vendored
2
third_party/rust/camino/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{"CHANGELOG.md":"2530b12d7ddf3395bbc4c10557e57531498039ba28528b91ffc3f3deefc76f77","CODE_OF_CONDUCT.md":"f51e207c2961ec061cac5c8aa9dd3098c3437de2c106d740c2aae90771bc0f86","Cargo.toml":"7bf7de17ab10cd95aadf102f37c0b8a58f0c31f90cfeee81126ead8ad3cb0a26","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"84762d717d0f2358c56f54ee46a6ca5f1582b7d3843f7a4d6e553ea04a57ca1b","build.rs":"ca6914ad35e69842b6fba6e436d0417f39dbe6ee18694d4dd89b372d31cbf715","clippy.toml":"818cba7332cc56b019d59e09805a3498f523da788f51454742905f1987c0b563","rustfmt.toml":"bf9776adb152b3fdc0d75c0929ede148c3e28c58f909a7d052865bc332e8958f","src/lib.rs":"3a744ca7df473bb8bd97e1f4a961d517cb7379b8756e38893dd9d53a169c41e1","src/proptest_impls.rs":"aa17bad810abe4a7b6c7a2c3163ae9749b03dd8bcef5043b0c4b9d00977f981c","src/serde_impls.rs":"eb7f00d1ceb7135506047dbefd7e6acee0364b5a9194111f49dbf2d1eb3661ac","src/tests.rs":"d6108c540dc93446b17d297b50372f799ef777c2cb0280fd37824a102ec24533","tests/integration_tests.rs":"b664a7555d2e5ac9ab71384e3ccfb73c01abe4c401f8de32e234c03b4d19d0f8"},"package":"88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e"}
|
||||
{"files":{"CHANGELOG.md":"ea1979dff05f6bdd9e2c6c65b8fdb28395bf59f16e7e7fa2a9d398bdd6ae106f","CODE_OF_CONDUCT.md":"f51e207c2961ec061cac5c8aa9dd3098c3437de2c106d740c2aae90771bc0f86","Cargo.toml":"b024a45f39757c112132e6ae883c0052b8bd86bfc166b89b9615621744fd8583","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"84762d717d0f2358c56f54ee46a6ca5f1582b7d3843f7a4d6e553ea04a57ca1b","build.rs":"ca6914ad35e69842b6fba6e436d0417f39dbe6ee18694d4dd89b372d31cbf715","clippy.toml":"818cba7332cc56b019d59e09805a3498f523da788f51454742905f1987c0b563","release.toml":"287514631fde7a1d29a8e8027bc37c585c7e30c173c8254f551b042e38f4bb81","rustfmt.toml":"bf9776adb152b3fdc0d75c0929ede148c3e28c58f909a7d052865bc332e8958f","src/lib.rs":"52da457eae1c189a1728df994b478fbf37baa85b630541b7a6cbb48670c1c329","src/proptest_impls.rs":"4f36f5804bd3cbbf65177db4b20d808ed56405388b552bad375aab308a535236","src/serde_impls.rs":"eb7f00d1ceb7135506047dbefd7e6acee0364b5a9194111f49dbf2d1eb3661ac","src/tests.rs":"d6108c540dc93446b17d297b50372f799ef777c2cb0280fd37824a102ec24533","tests/integration_tests.rs":"56aa396a173d0c255369159b57e4a7db294e607aa6cfb65efebd95d79cc51a04"},"package":"c77df041dc383319cc661b428b6961a005db4d6808d5e12536931b1ca9556055"}
|
8
third_party/rust/camino/CHANGELOG.md
vendored
8
third_party/rust/camino/CHANGELOG.md
vendored
@ -3,6 +3,13 @@
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.1.2] - 2022-08-12
|
||||
|
||||
### Added
|
||||
|
||||
- New convenience methods [`FromPathBufError::into_io_error`] and
|
||||
[`FromPathError::into_io_error`].
|
||||
|
||||
## [1.1.1] - 2022-08-12
|
||||
|
||||
### Fixed
|
||||
@ -101,6 +108,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
Initial release.
|
||||
|
||||
[1.1.2]: https://github.com/camino-rs/camino/releases/tag/camino-1.1.2
|
||||
[1.1.1]: https://github.com/camino-rs/camino/releases/tag/camino-1.1.1
|
||||
[1.1.0]: https://github.com/camino-rs/camino/releases/tag/camino-1.1.0
|
||||
[1.0.9]: https://github.com/camino-rs/camino/releases/tag/camino-1.0.9
|
||||
|
2
third_party/rust/camino/Cargo.toml
vendored
2
third_party/rust/camino/Cargo.toml
vendored
@ -12,7 +12,7 @@
|
||||
[package]
|
||||
edition = "2018"
|
||||
name = "camino"
|
||||
version = "1.1.1"
|
||||
version = "1.1.2"
|
||||
authors = [
|
||||
"Without Boats <saoirse@without.boats>",
|
||||
"Ashley Williams <ashley666ashley@gmail.com>",
|
||||
|
8
third_party/rust/camino/release.toml
vendored
Normal file
8
third_party/rust/camino/release.toml
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
sign-tag = true
|
||||
# Required for templates below to work
|
||||
consolidate-commits = false
|
||||
pre-release-commit-message = "[{{crate_name}}] version {{version}}"
|
||||
tag-message = "[{{crate_name}}] version {{version}}"
|
||||
tag-name = "camino-{{version}}"
|
||||
publish = false
|
||||
dependent-version = "upgrade"
|
42
third_party/rust/camino/src/lib.rs
vendored
42
third_party/rust/camino/src/lib.rs
vendored
@ -222,7 +222,7 @@ impl Utf8PathBuf {
|
||||
#[must_use]
|
||||
pub fn as_path(&self) -> &Utf8Path {
|
||||
// SAFETY: every Utf8PathBuf constructor ensures that self is valid UTF-8
|
||||
unsafe { Utf8Path::assume_utf8(&*self.0) }
|
||||
unsafe { Utf8Path::assume_utf8(&self.0) }
|
||||
}
|
||||
|
||||
/// Extends `self` with `path`.
|
||||
@ -1175,10 +1175,8 @@ impl Utf8Path {
|
||||
/// assert_eq!(path.canonicalize_utf8().unwrap(), Utf8PathBuf::from("/foo/test/bar.rs"));
|
||||
/// ```
|
||||
pub fn canonicalize_utf8(&self) -> io::Result<Utf8PathBuf> {
|
||||
self.canonicalize().and_then(|path| {
|
||||
path.try_into()
|
||||
.map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))
|
||||
})
|
||||
self.canonicalize()
|
||||
.and_then(|path| path.try_into().map_err(FromPathBufError::into_io_error))
|
||||
}
|
||||
|
||||
/// Reads a symbolic link, returning the file that the link points to.
|
||||
@ -1224,10 +1222,8 @@ impl Utf8Path {
|
||||
/// let path_link = path.read_link_utf8().expect("read_link call failed");
|
||||
/// ```
|
||||
pub fn read_link_utf8(&self) -> io::Result<Utf8PathBuf> {
|
||||
self.read_link().and_then(|path| {
|
||||
path.try_into()
|
||||
.map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))
|
||||
})
|
||||
self.read_link()
|
||||
.and_then(|path| path.try_into().map_err(FromPathBufError::into_io_error))
|
||||
}
|
||||
|
||||
/// Returns an iterator over the entries within a directory.
|
||||
@ -2488,13 +2484,24 @@ impl FromPathBufError {
|
||||
self.path
|
||||
}
|
||||
|
||||
/// Fetch a [`FromPathError`] for more about the conversion failure.
|
||||
/// Fetches a [`FromPathError`] for more about the conversion failure.
|
||||
///
|
||||
/// At the moment this struct does not contain any additional information, but is provided for
|
||||
/// completeness.
|
||||
pub fn from_path_error(&self) -> FromPathError {
|
||||
self.error
|
||||
}
|
||||
|
||||
/// Converts self into a [`std::io::Error`] with kind
|
||||
/// [`InvalidData`](io::ErrorKind::InvalidData).
|
||||
///
|
||||
/// Many users of `FromPathBufError` will want to convert it into an `io::Error`. This is a
|
||||
/// convenience method to do that.
|
||||
pub fn into_io_error(self) -> io::Error {
|
||||
// NOTE: we don't currently implement `From<FromPathBufError> for io::Error` because we want
|
||||
// to ensure the user actually desires that conversion.
|
||||
io::Error::new(io::ErrorKind::InvalidData, self)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for FromPathBufError {
|
||||
@ -2539,6 +2546,19 @@ impl error::Error for FromPathBufError {
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
pub struct FromPathError(());
|
||||
|
||||
impl FromPathError {
|
||||
/// Converts self into a [`std::io::Error`] with kind
|
||||
/// [`InvalidData`](io::ErrorKind::InvalidData).
|
||||
///
|
||||
/// Many users of `FromPathError` will want to convert it into an `io::Error`. This is a
|
||||
/// convenience method to do that.
|
||||
pub fn into_io_error(self) -> io::Error {
|
||||
// NOTE: we don't currently implement `From<FromPathBufError> for io::Error` because we want
|
||||
// to ensure the user actually desires that conversion.
|
||||
io::Error::new(io::ErrorKind::InvalidData, self)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for FromPathError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "Path contains invalid UTF-8")
|
||||
@ -2587,7 +2607,7 @@ impl AsRef<Path> for Utf8Path {
|
||||
|
||||
impl AsRef<Path> for Utf8PathBuf {
|
||||
fn as_ref(&self) -> &Path {
|
||||
&*self.0
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,9 +8,8 @@
|
||||
|
||||
// NOTE: #[cfg(feature = "proptest1")] is specified here to work with `doc_cfg`.
|
||||
|
||||
use proptest::{arbitrary::StrategyFor, prelude::*, strategy::MapInto};
|
||||
|
||||
use crate::{Utf8Path, Utf8PathBuf};
|
||||
use proptest::{arbitrary::StrategyFor, prelude::*, strategy::MapInto};
|
||||
|
||||
/// The [`Arbitrary`] impl for `Utf8PathBuf` returns a path with between 0 and 8 components,
|
||||
/// joined by the [`MAIN_SEPARATOR`](std::path::MAIN_SEPARATOR) for the platform. (Each component is
|
||||
|
@ -106,7 +106,7 @@ fn test_borrow_hash() {
|
||||
let owned = Utf8PathBuf::from(path);
|
||||
|
||||
assert_eq!(
|
||||
hash_output(&owned),
|
||||
hash_output(owned),
|
||||
hash_output(borrowed),
|
||||
"consistent Hash: {}",
|
||||
borrowed
|
||||
|
Loading…
Reference in New Issue
Block a user