mirror of
https://github.com/robertwayne/axum-htmx
synced 2024-12-26 10:19:32 +01:00
Simplify boolean expression
This commit is contained in:
parent
3928b9f407
commit
0156ceb268
1 changed files with 4 additions and 3 deletions
|
@ -104,9 +104,10 @@ impl IntoResponseParts for HxRefresh {
|
|||
fn into_response_parts(self, mut res: ResponseParts) -> Result<ResponseParts, Self::Error> {
|
||||
res.headers_mut().insert(
|
||||
headers::HX_REFRESH,
|
||||
match self.0 {
|
||||
true => HeaderValue::from_static("true"),
|
||||
false => HeaderValue::from_static("false"),
|
||||
if self.0 {
|
||||
HeaderValue::from_static("true")
|
||||
} else {
|
||||
HeaderValue::from_static("false")
|
||||
},
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue