summaryrefslogtreecommitdiffstats
path: root/vendor/camino
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/camino')
-rw-r--r--vendor/camino/.cargo-checksum.json2
-rw-r--r--vendor/camino/CHANGELOG.md8
-rw-r--r--vendor/camino/Cargo.toml2
-rw-r--r--vendor/camino/release.toml8
-rw-r--r--vendor/camino/src/lib.rs42
-rw-r--r--vendor/camino/src/proptest_impls.rs3
-rw-r--r--vendor/camino/tests/integration_tests.rs2
7 files changed, 51 insertions, 16 deletions
diff --git a/vendor/camino/.cargo-checksum.json b/vendor/camino/.cargo-checksum.json
index 81a1f0f60..8686980ae 100644
--- a/vendor/camino/.cargo-checksum.json
+++ b/vendor/camino/.cargo-checksum.json
@@ -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"} \ No newline at end of file
+{"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"} \ No newline at end of file
diff --git a/vendor/camino/CHANGELOG.md b/vendor/camino/CHANGELOG.md
index 67c2ea8d3..03d672242 100644
--- a/vendor/camino/CHANGELOG.md
+++ b/vendor/camino/CHANGELOG.md
@@ -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
diff --git a/vendor/camino/Cargo.toml b/vendor/camino/Cargo.toml
index 28c007855..1b2eb24d8 100644
--- a/vendor/camino/Cargo.toml
+++ b/vendor/camino/Cargo.toml
@@ -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>",
diff --git a/vendor/camino/release.toml b/vendor/camino/release.toml
new file mode 100644
index 000000000..b7977bad5
--- /dev/null
+++ b/vendor/camino/release.toml
@@ -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"
diff --git a/vendor/camino/src/lib.rs b/vendor/camino/src/lib.rs
index fcfba3805..44684b096 100644
--- a/vendor/camino/src/lib.rs
+++ b/vendor/camino/src/lib.rs
@@ -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
}
}
diff --git a/vendor/camino/src/proptest_impls.rs b/vendor/camino/src/proptest_impls.rs
index 997c88c8c..81776f226 100644
--- a/vendor/camino/src/proptest_impls.rs
+++ b/vendor/camino/src/proptest_impls.rs
@@ -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
diff --git a/vendor/camino/tests/integration_tests.rs b/vendor/camino/tests/integration_tests.rs
index a8b00f2fe..190ba82ba 100644
--- a/vendor/camino/tests/integration_tests.rs
+++ b/vendor/camino/tests/integration_tests.rs
@@ -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