Skip to content

Commit fd96bd6

Browse files
committed
controllers: Implement RequestUtils for all RequestPartsExt implementers
1 parent b5eb44d commit fd96bd6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/controllers.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ mod prelude {
2020
pub use http::{header, Request, StatusCode};
2121

2222
pub use super::conduit_axum::conduit_compat;
23+
use crate::controllers::util::RequestPartsExt;
2324
pub use crate::middleware::app::RequestApp;
2425
pub use crate::util::errors::{cargo_err, AppError, AppResult, BoxedAppError};
2526
use indexmap::IndexMap;
@@ -34,7 +35,7 @@ mod prelude {
3435
fn query_with_params(&self, params: IndexMap<String, String>) -> String;
3536
}
3637

37-
impl<B> RequestUtils for Request<B> {
38+
impl<T: RequestPartsExt> RequestUtils for T {
3839
fn query(&self) -> IndexMap<String, String> {
3940
url::form_urlencoded::parse(self.uri().query().unwrap_or("").as_bytes())
4041
.into_owned()

0 commit comments

Comments
 (0)