From a927031ec93f662cc9c639f3e31336e8930f1218 Mon Sep 17 00:00:00 2001 From: jingyu Date: Sun, 3 Nov 2024 14:26:37 +0800 Subject: [PATCH] chore: update dependencies && commit Cargo.lock --- .gitignore | 1 - Cargo.lock | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 8 +-- src/lib.rs | 1 + src/uri.rs | 18 ++----- 5 files changed, 161 insertions(+), 19 deletions(-) create mode 100644 Cargo.lock diff --git a/.gitignore b/.gitignore index 997609a..be92285 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ target -Cargo.lock /.settings/ /.project /.vscode diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..020d6ae --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,152 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "borrow-or-share" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eeab4423108c5d7c744f4d234de88d18d636100093ae04caf4825134b9c3a32" + +[[package]] +name = "fluent-uri" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1918b65d96df47d3591bed19c5cca17e3fa5d0707318e4b5ef2eae01764df7e5" +dependencies = [ + "borrow-or-share", + "ref-cast", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lsp-types" +version = "0.97.0" +dependencies = [ + "bitflags", + "fluent-uri", + "serde", + "serde_json", + "serde_repr", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ref-cast" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "serde" +version = "1.0.214" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.214" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.132" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "syn" +version = "2.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89275301d38033efb81a6e60e3497e734dfcc62571f2854bf4b16690398824c" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" diff --git a/Cargo.toml b/Cargo.toml index ae08a87..09d5ab3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,11 +15,11 @@ keywords = ["language", "server", "lsp", "vscode", "lsif"] license = "MIT" [dependencies] -bitflags = "1.0.1" -serde = { version = "1.0.34", features = ["derive"] } -serde_json = "1.0.50" +bitflags = "2.6" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" serde_repr = "0.1" -fluent-uri = "0.1.4" +fluent-uri = "0.3" [features] default = [] diff --git a/src/lib.rs b/src/lib.rs index 6ffeab5..b260a2e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2386,6 +2386,7 @@ pub struct RelativePattern { pub type Pattern = String; bitflags! { +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] pub struct WatchKind: u8 { /// Interested in create events. const Create = 1; diff --git a/src/uri.rs b/src/uri.rs index 6f82d58..914772a 100644 --- a/src/uri.rs +++ b/src/uri.rs @@ -21,9 +21,9 @@ impl<'de> Deserialize<'de> for Uri { D: serde::Deserializer<'de>, { let string = String::deserialize(deserializer)?; - fluent_uri::Uri::::parse_from(string) + fluent_uri::Uri::parse(string) .map(Uri) - .map_err(|(_, error)| Error::custom(error.to_string())) + .map_err(|error| Error::custom(error.to_string())) } } @@ -40,15 +40,10 @@ impl PartialOrd for Uri { } impl FromStr for Uri { - type Err = fluent_uri::ParseError; + type Err = fluent_uri::error::ParseError; fn from_str(s: &str) -> Result { - // TOUCH-UP: - // Use upstream `FromStr` implementation if and when - // https://github.com/yescallop/fluent-uri-rs/pull/10 - // gets merged. - // fluent_uri::Uri::from_str(s).map(Self) - fluent_uri::Uri::parse(s).map(|uri| Self(uri.to_owned())) + fluent_uri::Uri::from_str(s).map(|uri| Self(uri.to_owned())) } } @@ -60,11 +55,6 @@ impl Deref for Uri { } } -/* - TOUCH-UP: `PartialEq`, `Eq` and `Hash` could all be derived - if and when the respective implementations get merged upstream: - https://github.com/yescallop/fluent-uri-rs/pull/9 -*/ impl PartialEq for Uri { fn eq(&self, other: &Self) -> bool { self.as_str() == other.as_str()