diff --git a/Cargo.toml b/Cargo.toml
index 42a4e25..1127c45 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.4"
 
 [dependencies.serde]
 version = "1.0.34"
diff --git a/src/uri.rs b/src/uri.rs
index 6f82d58..93b0c8e 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.0.to_string()))
     }
 }
 
