We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c692dc commit f2d6210Copy full SHA for f2d6210
frameworks/Rust/axum/src/common/utils.rs
@@ -7,13 +7,14 @@ use serde::Deserialize;
7
8
#[derive(Debug, Deserialize)]
9
pub struct Params {
10
- queries: Option<String>,
+ q: Option<String>,
11
}
12
13
#[allow(dead_code)]
14
+#[inline(always)]
15
pub fn parse_params(params: Params) -> usize {
16
params
- .queries
17
+ .q
18
.and_then(|q| q.parse().ok())
19
.unwrap_or(1)
20
.clamp(1, 500)
0 commit comments