chore: cargo fmt

This commit is contained in:
Greg Johnston 2024-03-31 14:12:24 -04:00
parent 3e18edb8f9
commit bfac4cba2a
2 changed files with 11 additions and 10 deletions

View file

@ -59,12 +59,10 @@ pub fn html_parts_separated(
// First check runtime env, then build time, then default:
let pkg_path = match std::env::var("CDN_PKG_PATH").ok().map(Cow::from) {
Some(path) => path,
None => {
match option_env!("CDN_PKG_PATH").map(Cow::from) {
Some(path) => path,
None => format!("/{}", options.site_pkg_dir).into(),
}
}
None => match option_env!("CDN_PKG_PATH").map(Cow::from) {
Some(path) => path,
None => format!("/{}", options.site_pkg_dir).into(),
},
};
let output_name = &options.output_name;
let nonce = use_nonce();

View file

@ -39,10 +39,13 @@ pub fn location_hash() -> Option<String> {
if is_server() {
None
} else {
location().hash().ok().map(|hash| match hash.chars().next() {
Some('#') => hash[1..].to_string(),
_ => hash,
})
location()
.hash()
.ok()
.map(|hash| match hash.chars().next() {
Some('#') => hash[1..].to_string(),
_ => hash,
})
}
}