Commit f5ffe0b5 authored by Andrew Imm's avatar Andrew Imm

styling nits

parent af70a8cf
...@@ -718,20 +718,20 @@ async fn fetch_real_stylesheet( ...@@ -718,20 +718,20 @@ async fn fetch_real_stylesheet(
disk_cache: &Option<FontDiskCache>, disk_cache: &Option<FontDiskCache>,
) -> Result<Option<Vc<RcStr>>> { ) -> Result<Option<Vc<RcStr>>> {
// Check disk cache first // Check disk cache first
if let Some(cache) = disk_cache { if let Some(cache) = disk_cache
if let Some(css) = cache.get_css(&stylesheet_url) { && let Some(css) = cache.get_css(&stylesheet_url)
return Ok(Some(Vc::cell(css.into()))); {
} return Ok(Some(Vc::cell(css.into())));
} }
let body = let body =
fetch_from_google_fonts(fetch_client, stylesheet_url.clone(), css_virtual_path).await?; fetch_from_google_fonts(fetch_client, stylesheet_url.clone(), css_virtual_path).await?;
if let Some(body) = &body { if let Some(body) = &body
if let Some(cache) = disk_cache { && let Some(cache) = disk_cache
let css_str = body.to_string().await?; {
cache.set_css(&stylesheet_url, &css_str); let css_str = body.to_string().await?;
} cache.set_css(&stylesheet_url, &css_str);
} }
Ok(body.map(|body| body.to_string())) Ok(body.map(|body| body.to_string()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment