diff --git a/Cargo.toml b/Cargo.toml index a7e11d1df8..65ea961db7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ "poem-derive", "poem", diff --git a/poem-openapi/src/base.rs b/poem-openapi/src/base.rs index d201d7db33..78979a815b 100644 --- a/poem-openapi/src/base.rs +++ b/poem-openapi/src/base.rs @@ -43,7 +43,7 @@ impl Deref for UrlQuery { impl UrlQuery { /// Returns all values with the specified name. - pub fn get_all<'a>(&'a self, name: &'a str) -> impl Iterator + 'a { + pub fn get_all<'a, 'b: 'a>(&'b self, name: &'a str) -> impl Iterator + 'a { self.0 .iter() .filter(move |(n, _)| n == name) @@ -51,7 +51,7 @@ impl UrlQuery { } /// Returns the first value with the specified name. - pub fn get(&self, name: &str) -> Option<&String> { + pub fn get(&self, name: &str) -> Option<&str> { self.get_all(name).next() } }