diff options
Diffstat (limited to 'vendor/camino')
-rw-r--r-- | vendor/camino/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/camino/CHANGELOG.md | 12 | ||||
-rw-r--r-- | vendor/camino/CODE_OF_CONDUCT.md | 133 | ||||
-rw-r--r-- | vendor/camino/Cargo.toml | 2 | ||||
-rw-r--r-- | vendor/camino/src/lib.rs | 2 | ||||
-rw-r--r-- | vendor/camino/src/serde_impls.rs | 46 |
6 files changed, 54 insertions, 143 deletions
diff --git a/vendor/camino/.cargo-checksum.json b/vendor/camino/.cargo-checksum.json index d5eb10268..ded873d97 100644 --- a/vendor/camino/.cargo-checksum.json +++ b/vendor/camino/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"519fb19bd7caf35f27c409e5d026910edac7fd9183db0cf145f36cb25834e44c","CODE_OF_CONDUCT.md":"f51e207c2961ec061cac5c8aa9dd3098c3437de2c106d740c2aae90771bc0f86","Cargo.toml":"7eba97118307432703c9f2154e6724878879b37645adf37ca9a49e48fd256f7c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"4ca8f827ccdad7459c2b7524587a25523a857f3ff4bbb11d569e666118806f49","build.rs":"a57fc77ab3880126e9d83088eff56dea7a7cfee9c18a920c244a724ad89b164d","clippy.toml":"818cba7332cc56b019d59e09805a3498f523da788f51454742905f1987c0b563","release.toml":"287514631fde7a1d29a8e8027bc37c585c7e30c173c8254f551b042e38f4bb81","rustfmt.toml":"bf9776adb152b3fdc0d75c0929ede148c3e28c58f909a7d052865bc332e8958f","src/lib.rs":"c01c8671336a98dd33b0c8900feac21f668e2789643eb1adad065e6d04a70bea","src/proptest_impls.rs":"4f36f5804bd3cbbf65177db4b20d808ed56405388b552bad375aab308a535236","src/serde_impls.rs":"f6d8a59a4e97a9d021a30466628780097bb82231ccc0a17ae861198e1ec24539","src/tests.rs":"2cb79e032972ca5eccd9ad95bed1e0314b15e5e7eaa84ecb53acc37636598afe","tests/integration_tests.rs":"56aa396a173d0c255369159b57e4a7db294e607aa6cfb65efebd95d79cc51a04"},"package":"c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2"}
\ No newline at end of file +{"files":{"CHANGELOG.md":"979191a4e606b72622b6049da05e14190e5d36379f517a167ffc79d8d0846ede","Cargo.toml":"c1a6ba7fa2cef4385fdff5bfddcf8702defce109ed2b73d33e95f1b0d0661cbd","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"4ca8f827ccdad7459c2b7524587a25523a857f3ff4bbb11d569e666118806f49","build.rs":"a57fc77ab3880126e9d83088eff56dea7a7cfee9c18a920c244a724ad89b164d","clippy.toml":"818cba7332cc56b019d59e09805a3498f523da788f51454742905f1987c0b563","release.toml":"287514631fde7a1d29a8e8027bc37c585c7e30c173c8254f551b042e38f4bb81","rustfmt.toml":"bf9776adb152b3fdc0d75c0929ede148c3e28c58f909a7d052865bc332e8958f","src/lib.rs":"19a145d12c9935ffb80cc084fd580806c622a3068b53d2792532c440460be732","src/proptest_impls.rs":"4f36f5804bd3cbbf65177db4b20d808ed56405388b552bad375aab308a535236","src/serde_impls.rs":"981f529290f18445a9814c46ae57c9e5ab390a361fb7eb1dd4f4ed7a3f94fc03","src/tests.rs":"2cb79e032972ca5eccd9ad95bed1e0314b15e5e7eaa84ecb53acc37636598afe","tests/integration_tests.rs":"56aa396a173d0c255369159b57e4a7db294e607aa6cfb65efebd95d79cc51a04"},"package":"c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c"}
\ No newline at end of file diff --git a/vendor/camino/CHANGELOG.md b/vendor/camino/CHANGELOG.md index d4b4de0a0..7558c7097 100644 --- a/vendor/camino/CHANGELOG.md +++ b/vendor/camino/CHANGELOG.md @@ -3,6 +3,16 @@ 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.6] - 2023-07-11 + +### Added + +- Implement `Deserialize` for `Box<Utf8Path>`. + +## [1.1.5] - 2023-07-11 + +(This release was not published due to an internal issue.) + ## [1.1.4] - 2023-03-09 ### Added @@ -120,6 +130,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Initial release. +[1.1.6]: https://github.com/camino-rs/camino/releases/tag/camino-1.1.6 +[1.1.5]: https://github.com/camino-rs/camino/releases/tag/camino-1.1.5 [1.1.4]: https://github.com/camino-rs/camino/releases/tag/camino-1.1.4 [1.1.3]: https://github.com/camino-rs/camino/releases/tag/camino-1.1.3 [1.1.2]: https://github.com/camino-rs/camino/releases/tag/camino-1.1.2 diff --git a/vendor/camino/CODE_OF_CONDUCT.md b/vendor/camino/CODE_OF_CONDUCT.md deleted file mode 100644 index 2ea2606d0..000000000 --- a/vendor/camino/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,133 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual identity -and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at the email -address: [codeofconduct@sunshowers.io](mailto:codeofconduct@sunshowers.io). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available -at [https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations - diff --git a/vendor/camino/Cargo.toml b/vendor/camino/Cargo.toml index 7bb01ed55..b0bfabdfd 100644 --- a/vendor/camino/Cargo.toml +++ b/vendor/camino/Cargo.toml @@ -12,7 +12,7 @@ [package] edition = "2018" name = "camino" -version = "1.1.4" +version = "1.1.6" authors = [ "Without Boats <saoirse@without.boats>", "Ashley Williams <ashley666ashley@gmail.com>", diff --git a/vendor/camino/src/lib.rs b/vendor/camino/src/lib.rs index 86a58ee51..7a5c61c10 100644 --- a/vendor/camino/src/lib.rs +++ b/vendor/camino/src/lib.rs @@ -2055,7 +2055,7 @@ impl<'a> fmt::Display for Utf8PrefixComponent<'a> { /// Iterator over the entries in a directory. /// /// This iterator is returned from [`Utf8Path::read_dir_utf8`] and will yield instances of -/// <code>[io::Result]<[Utf8DirEntry]></code>. Through a [`Utf8 DirEntry`] information like the entry's path +/// <code>[io::Result]<[Utf8DirEntry]></code>. Through a [`Utf8DirEntry`] information like the entry's path /// and possibly other metadata can be learned. /// /// The order in which this iterator returns entries is platform and filesystem diff --git a/vendor/camino/src/serde_impls.rs b/vendor/camino/src/serde_impls.rs index 49b6f8621..1a7fa1b9e 100644 --- a/vendor/camino/src/serde_impls.rs +++ b/vendor/camino/src/serde_impls.rs @@ -6,7 +6,7 @@ //! The Serde implementations for `Utf8PathBuf` are derived, but `Utf8Path` is an unsized type which //! the derive impls can't handle. Implement these by hand. -use crate::Utf8Path; +use crate::{Utf8Path, Utf8PathBuf}; use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use std::fmt; @@ -36,7 +36,6 @@ impl<'a> de::Visitor<'a> for Utf8PathVisitor { } } -#[cfg(feature = "serde1")] impl<'de: 'a, 'a> Deserialize<'de> for &'a Utf8Path { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where @@ -46,7 +45,6 @@ impl<'de: 'a, 'a> Deserialize<'de> for &'a Utf8Path { } } -#[cfg(feature = "serde1")] impl Serialize for Utf8Path { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where @@ -56,6 +54,20 @@ impl Serialize for Utf8Path { } } +impl<'de> Deserialize<'de> for Box<Utf8Path> { + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: Deserializer<'de>, + { + Ok(Utf8PathBuf::deserialize(deserializer)?.into()) + } +} + +// impl Serialize for Box<Utf8Path> comes from impl Serialize for Utf8Path. + +// Can't provide impls for Arc/Rc due to orphan rule issues, but we could provide +// `with` impls in the future as requested. + #[cfg(test)] mod tests { use super::*; @@ -73,6 +85,7 @@ mod tests { assert_valid_utf8::<DecodeOwned>(input, &encoded); assert_valid_utf8::<DecodeBorrowed>(input, &encoded); + assert_valid_utf8::<DecodeBoxed>(input, &encoded); } } @@ -84,6 +97,8 @@ mod tests { "for input, with {}, paths should match", T::description() ); + let roundtrip = bincode::serialize(&output).expect("message should roundtrip"); + assert_eq!(roundtrip, encoded, "encoded path matches"); } #[test] @@ -101,7 +116,8 @@ mod tests { let encoded = bincode::serialize(&encode).expect("encoded correctly"); assert_invalid_utf8::<DecodeOwned>(input, &encoded, *valid_up_to, *error_len); - assert_invalid_utf8::<DecodeBorrowed>(input, &encoded, *valid_up_to, *error_len) + assert_invalid_utf8::<DecodeBorrowed>(input, &encoded, *valid_up_to, *error_len); + assert_invalid_utf8::<DecodeBoxed>(input, &encoded, *valid_up_to, *error_len); } } @@ -142,12 +158,12 @@ mod tests { path: ByteBuf, } - trait TestTrait<'de>: Deserialize<'de> + fmt::Debug { + trait TestTrait<'de>: Serialize + Deserialize<'de> + fmt::Debug { fn description() -> &'static str; fn path(&self) -> &Utf8Path; } - #[derive(Deserialize, Debug)] + #[derive(Serialize, Deserialize, Debug)] #[allow(unused)] struct DecodeOwned { path: Utf8PathBuf, @@ -163,7 +179,7 @@ mod tests { } } - #[derive(Deserialize, Debug)] + #[derive(Serialize, Deserialize, Debug)] #[allow(unused)] struct DecodeBorrowed<'a> { #[serde(borrow)] @@ -179,4 +195,20 @@ mod tests { self.path } } + + #[derive(Serialize, Deserialize, Debug)] + #[allow(unused)] + struct DecodeBoxed { + path: Box<Utf8Path>, + } + + impl<'de> TestTrait<'de> for DecodeBoxed { + fn description() -> &'static str { + "DecodeBoxed" + } + + fn path(&self) -> &Utf8Path { + &self.path + } + } } |