File: upgrade-fluent-uri.patch

package info (click to toggle)
rust-lsp-types 0.97.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 584 kB
  • sloc: sh: 10; makefile: 4
file content (38 lines) | stat: -rw-r--r-- 1,073 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff --git a/Cargo.toml b/Cargo.toml
index 42a4e25..f3eca6e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,7 +34,7 @@ repository = "https://github.com/gluon-lang/lsp-types"
 version = "1.0.1"
 
 [dependencies.fluent-uri]
-version = "0.1.4"
+version = "0.3"
 
 [dependencies.serde]
 version = "1.0.34"
diff --git a/src/uri.rs b/src/uri.rs
index 6f82d58..0b1f99f 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::<String>::parse_from(string)
+        fluent_uri::Uri::<String>::parse(string)
             .map(Uri)
-            .map_err(|(_, error)| Error::custom(error.to_string()))
+            .map_err(|error| Error::custom(error.to_string()))
     }
 }
 
@@ -40,7 +40,7 @@ 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<Self, Self::Err> {
         // TOUCH-UP: