mirror of
https://github.com/robertwayne/axum-htmx
synced 2024-11-26 05:09:35 +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()
|
.to_str()
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|url| url.parse::<http::Uri>().ok());
|
.and_then(|url| url.parse::<http::Uri>().ok());
|
||||||
|
|
||||||
return Ok(HxCurrentUrl(url));
|
return Ok(HxCurrentUrl(url));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ impl HxLocation {
|
||||||
path: self.uri.to_string(),
|
path: self.uri.to_string(),
|
||||||
opts: self.options,
|
opts: self.options,
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(serde_json::to_string(&loc_with_opts)?)
|
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)
|
.map(|HxEvent { name }| name)
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join(", ");
|
.join(", ");
|
||||||
|
|
||||||
http::HeaderValue::from_str(&header).map_err(Into::into)
|
http::HeaderValue::from_str(&header).map_err(Into::into)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue