diff options
Diffstat (limited to 'vendor/clap_lex')
-rw-r--r-- | vendor/clap_lex/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/clap_lex/Cargo.toml | 28 | ||||
-rw-r--r-- | vendor/clap_lex/README.md | 8 | ||||
-rw-r--r-- | vendor/clap_lex/src/ext.rs | 42 | ||||
-rw-r--r-- | vendor/clap_lex/src/lib.rs | 16 |
5 files changed, 27 insertions, 69 deletions
diff --git a/vendor/clap_lex/.cargo-checksum.json b/vendor/clap_lex/.cargo-checksum.json index 096f62c28..25c2e4c4a 100644 --- a/vendor/clap_lex/.cargo-checksum.json +++ b/vendor/clap_lex/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"c9eb0f99077d05483dfe7737502d90522d1d3271c98d1ac53f6e5ae7a5d4f582","LICENSE-APACHE":"c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4","LICENSE-MIT":"0d687e1f07b58fe68bda74668ff6326125e5e5efa184cce755cd84ac535b7058","README.md":"d1f4162770bfbd32c84dc9d914dceeb6e5050ab8be5037e7eb4539b8bbbb8e73","src/ext.rs":"7eae476b1f6919949e2c72331117a34e11eb3c21eebc050410870e7bbd06092c","src/lib.rs":"233a2661c7cfb61d95848e0fc2d37477912c29474a8db0c858ac71bc6af86d57"},"package":"8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1"}
\ No newline at end of file +{"files":{"Cargo.toml":"b0a0a9111e2a86bb007b835e8480b5d132b0291699156adc9ed2fd2967e3da43","LICENSE-APACHE":"c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4","LICENSE-MIT":"0d687e1f07b58fe68bda74668ff6326125e5e5efa184cce755cd84ac535b7058","README.md":"cf2d9c398038ce33c6ee39aac0aff84c550e041a4b5a79dc9c95258e2f416e3a","src/ext.rs":"f16c249c340d3c42aa566f2ff279878f807cbc74f17de19dc388f8ab352f8f1d","src/lib.rs":"db7106a744428be0915f94f4c053d04c5dd5332a1f8f57ca54a5aa7d566bae47"},"package":"2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"}
\ No newline at end of file diff --git a/vendor/clap_lex/Cargo.toml b/vendor/clap_lex/Cargo.toml index 5fa2b9292..8b2791423 100644 --- a/vendor/clap_lex/Cargo.toml +++ b/vendor/clap_lex/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.64.0" name = "clap_lex" -version = "0.4.1" +version = "0.5.0" include = [ "build.rs", "src/**/*", @@ -38,45 +38,45 @@ repository = "https://github.com/clap-rs/clap/tree/master/clap_lex" [[package.metadata.release.pre-release-replacements]] file = "CHANGELOG.md" -search = "Unreleased" -replace = "{{version}}" min = 1 +replace = "{{version}}" +search = "Unreleased" [[package.metadata.release.pre-release-replacements]] +exactly = 1 file = "CHANGELOG.md" -search = '\.\.\.HEAD' replace = "...{{tag_name}}" -exactly = 1 +search = '\.\.\.HEAD' [[package.metadata.release.pre-release-replacements]] file = "CHANGELOG.md" -search = "ReleaseDate" -replace = "{{date}}" min = 1 +replace = "{{date}}" +search = "ReleaseDate" [[package.metadata.release.pre-release-replacements]] +exactly = 1 file = "CHANGELOG.md" -search = "<!-- next-header -->" replace = """ <!-- next-header --> ## [Unreleased] - ReleaseDate """ -exactly = 1 +search = "<!-- next-header -->" [[package.metadata.release.pre-release-replacements]] +exactly = 1 file = "CHANGELOG.md" -search = "<!-- next-url -->" replace = """ <!-- next-url --> [Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD""" -exactly = 1 +search = "<!-- next-url -->" [[package.metadata.release.pre-release-replacements]] -file = "README.md" -search = "github.com/clap-rs/clap/blob/[^/]+/" -replace = "github.com/clap-rs/clap/blob/{{tag_name}}/" exactly = 4 +file = "README.md" prerelease = true +replace = "github.com/clap-rs/clap/blob/{{tag_name}}/" +search = "github.com/clap-rs/clap/blob/[^/]+/" [lib] bench = false diff --git a/vendor/clap_lex/README.md b/vendor/clap_lex/README.md index 18d856205..5d97fc4d3 100644 --- a/vendor/clap_lex/README.md +++ b/vendor/clap_lex/README.md @@ -5,15 +5,15 @@ [![Crates.io](https://img.shields.io/crates/v/clap_lex?style=flat-square)](https://crates.io/crates/clap_lex) [![Crates.io](https://img.shields.io/crates/d/clap_lex?style=flat-square)](https://crates.io/crates/clap_lex) -[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/clap_lex-v0.4.1/LICENSE-APACHE) -[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/clap_lex-v0.4.1/LICENSE-MIT) +[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/clap_lex-v0.5.0/LICENSE-APACHE) +[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/clap_lex-v0.5.0/LICENSE-MIT) Dual-licensed under [Apache 2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT). 1. [About](#about) 2. [API Reference](https://docs.rs/clap_lex) 3. [Questions & Discussions](https://github.com/clap-rs/clap/discussions) -4. [CONTRIBUTING](https://github.com/clap-rs/clap/blob/clap_lex-v0.4.1/clap_lex/CONTRIBUTING.md) -5. [Sponsors](https://github.com/clap-rs/clap/blob/clap_lex-v0.4.1/README.md#sponsors) +4. [CONTRIBUTING](https://github.com/clap-rs/clap/blob/clap_lex-v0.5.0/clap_lex/CONTRIBUTING.md) +5. [Sponsors](https://github.com/clap-rs/clap/blob/clap_lex-v0.5.0/README.md#sponsors) ## About diff --git a/vendor/clap_lex/src/ext.rs b/vendor/clap_lex/src/ext.rs index 0e6b33ebb..a2de707e2 100644 --- a/vendor/clap_lex/src/ext.rs +++ b/vendor/clap_lex/src/ext.rs @@ -162,39 +162,6 @@ pub trait OsStrExt: private::Sealed { /// /// [`split_whitespace`]: str::split_whitespace fn split<'s, 'n>(&'s self, needle: &'n str) -> Split<'s, 'n>; - /// Divide one string slice into two at an index. - /// - /// The argument, `mid`, should be a byte offset from the start of the - /// string. It must also be on the boundary of a UTF-8 code point. - /// - /// The two slices returned go from the start of the string slice to `mid`, - /// and from `mid` to the end of the string slice. - /// - /// To get mutable string slices instead, see the [`split_at_mut`] - /// method. - /// - /// [`split_at_mut`]: str::split_at_mut - /// - /// # Panics - /// - /// Panics if `mid` is not on a UTF-8 code point boundary, or if it is - /// past the end of the last code point of the string slice. - /// - /// # Examples - /// - /// Basic usage: - /// - /// ``` - /// use clap_lex::OsStrExt as _; - /// let s = std::ffi::OsStr::new("Per Martin-Löf"); - /// - /// let (first, last) = s.split_at(3); - /// - /// assert_eq!("Per", first); - /// assert_eq!(" Martin-Löf", last); - /// ``` - #[deprecated(since = "4.1.0", note = "This is not sound for all `index`")] - fn split_at(&self, index: usize) -> (&OsStr, &OsStr); /// Splits the string on the first occurrence of the specified delimiter and /// returns prefix before delimiter and suffix after delimiter. /// @@ -249,15 +216,6 @@ impl OsStrExt for OsStr { } } - fn split_at(&self, index: usize) -> (&OsStr, &OsStr) { - let bytes = to_bytes(self); - unsafe { - // BUG: This is unsafe and has been deprecated - let (first, second) = bytes.split_at(index); - (to_os_str_unchecked(first), to_os_str_unchecked(second)) - } - } - fn split_once(&self, needle: &'_ str) -> Option<(&OsStr, &OsStr)> { let start = self.find(needle)?; let end = start + needle.len(); diff --git a/vendor/clap_lex/src/lib.rs b/vendor/clap_lex/src/lib.rs index b349fba51..d519a10c5 100644 --- a/vendor/clap_lex/src/lib.rs +++ b/vendor/clap_lex/src/lib.rs @@ -40,7 +40,7 @@ //! Ok(Color::Never) //! } //! Some(invalid) => { -//! Err(format!("Invalid value for `--color`, {:?}", invalid).into()) +//! Err(format!("Invalid value for `--color`, {invalid:?}").into()) //! } //! } //! } @@ -67,7 +67,7 @@ //! match long { //! Ok("verbose") => { //! if let Some(value) = value { -//! return Err(format!("`--verbose` does not take a value, got `{:?}`", value).into()); +//! return Err(format!("`--verbose` does not take a value, got `{value:?}`").into()); //! } //! args.verbosity += 1; //! } @@ -91,7 +91,7 @@ //! args.color = Color::parse(value)?; //! } //! Ok(c) => { -//! return Err(format!("Unexpected flag: -{}", c).into()); +//! return Err(format!("Unexpected flag: -{c}").into()); //! } //! Err(e) => { //! return Err(format!("Unexpected flag: -{}", e.to_string_lossy()).into()); @@ -107,7 +107,7 @@ //! } //! //! let args = parse_args(["bin", "--hello", "world"]); -//! println!("{:?}", args); +//! println!("{args:?}"); //! ``` mod ext; @@ -139,7 +139,7 @@ impl RawArgs { /// let _bin = raw.next_os(&mut cursor); /// /// let mut paths = raw.remaining(&mut cursor).map(PathBuf::from).collect::<Vec<_>>(); - /// println!("{:?}", paths); + /// println!("{paths:?}"); /// ``` pub fn from_args() -> Self { Self::new(std::env::args_os()) @@ -156,7 +156,7 @@ impl RawArgs { /// let _bin = raw.next_os(&mut cursor); /// /// let mut paths = raw.remaining(&mut cursor).map(PathBuf::from).collect::<Vec<_>>(); - /// println!("{:?}", paths); + /// println!("{paths:?}"); /// ``` pub fn new(iter: impl IntoIterator<Item = impl Into<std::ffi::OsString>>) -> Self { let iter = iter.into_iter(); @@ -174,7 +174,7 @@ impl RawArgs { /// let _bin = raw.next_os(&mut cursor); /// /// let mut paths = raw.remaining(&mut cursor).map(PathBuf::from).collect::<Vec<_>>(); - /// println!("{:?}", paths); + /// println!("{paths:?}"); /// ``` pub fn cursor(&self) -> ArgCursor { ArgCursor::new() @@ -213,7 +213,7 @@ impl RawArgs { /// let _bin = raw.next_os(&mut cursor); /// /// let mut paths = raw.remaining(&mut cursor).map(PathBuf::from).collect::<Vec<_>>(); - /// println!("{:?}", paths); + /// println!("{paths:?}"); /// ``` pub fn remaining(&self, cursor: &mut ArgCursor) -> impl Iterator<Item = &OsStr> { let remaining = self.items[cursor.cursor..].iter().map(|s| s.as_os_str()); |