Skip to content

Commit 1ca868f

Browse files
committed
poem-openapi: fix lifetime of UrlQuery::get_all
1 parent 87a443a commit 1ca868f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "2"
23
members = [
34
"poem-derive",
45
"poem",

poem-openapi/src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Deref for UrlQuery {
4343

4444
impl UrlQuery {
4545
/// Returns all values with the specified name.
46-
pub fn get_all<'a>(&'a self, name: &'a str) -> impl Iterator<Item = &'a String> + 'a {
46+
pub fn get_all<'a, 'b: 'a>(&'b self, name: &'a str) -> impl Iterator<Item = &'b String> + 'a {
4747
self.0
4848
.iter()
4949
.filter(move |(n, _)| n == name)

0 commit comments

Comments
 (0)