mirror of
https://github.com/robertwayne/axum-htmx
synced 2024-11-23 20:02:50 +01:00
Minor stylistic tweaks
This commit is contained in:
parent
97b72850f5
commit
035c9c0e5e
3 changed files with 3 additions and 0 deletions
|
@ -60,6 +60,7 @@ where
|
|||
.to_str()
|
||||
.ok()
|
||||
.and_then(|url| url.parse::<http::Uri>().ok());
|
||||
|
||||
return Ok(HxCurrentUrl(url));
|
||||
}
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ impl HxLocation {
|
|||
path: self.uri.to_string(),
|
||||
opts: self.options,
|
||||
};
|
||||
|
||||
Ok(serde_json::to_string(&loc_with_opts)?)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ fn events_to_header_value(events: Vec<HxEvent>) -> Result<http::HeaderValue, HxE
|
|||
.map(|HxEvent { name }| name)
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ");
|
||||
|
||||
http::HeaderValue::from_str(&header).map_err(Into::into)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue