From 2787a274f279fef6fdf8effe7a89932da1b08a12 Mon Sep 17 00:00:00 2001 From: arctic_hen7 Date: Fri, 8 Oct 2021 10:35:32 +1100 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=8E=A8=20ran=20`cargo=20fmt`=20a?= =?UTF-8?q?nd=20fixed=20clippy=20lints?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/website/src/templates/docs/container.rs | 2 +- website/website/src/templates/docs/generation.rs | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/website/website/src/templates/docs/container.rs b/website/website/src/templates/docs/container.rs index 1188b76455..6b0591fb75 100644 --- a/website/website/src/templates/docs/container.rs +++ b/website/website/src/templates/docs/container.rs @@ -17,7 +17,7 @@ struct DocsVersionSwitcherProps { fn docs_version_switcher(props: DocsVersionSwitcherProps) -> SycamoreTemplate { let manifest = props.manifest.clone(); let manifest_2 = manifest.clone(); - let current_version = props.current_version.clone(); + let current_version = props.current_version; let current_version_2 = current_version.clone(); let current_version_3 = current_version.clone(); let current_version_4 = current_version.clone(); diff --git a/website/website/src/templates/docs/generation.rs b/website/website/src/templates/docs/generation.rs index f2c71bfaad..ad551f08a9 100644 --- a/website/website/src/templates/docs/generation.rs +++ b/website/website/src/templates/docs/generation.rs @@ -1,7 +1,9 @@ use crate::templates::docs::icons::{ERROR_ICON, WARNING_ICON}; use crate::templates::docs::template::DocsPageProps; use lazy_static::lazy_static; -use perseus::{link, t, RenderFnResult, RenderFnResultWithCause, path_prefix::get_path_prefix_server}; +use perseus::{ + link, path_prefix::get_path_prefix_server, t, RenderFnResult, RenderFnResultWithCause, +}; use pulldown_cmark::{html, Options, Parser}; use serde::{Deserialize, Serialize}; use std::fs; @@ -222,8 +224,10 @@ pub async fn get_build_state(path: String, locale: String) -> RenderFnResultWith let sidebar_contents = fs::read_to_string(&sidebar_fs_path)?; // Replace all links in that file with localized equivalents with versions as well (with the base path added) // That means unversioned paths will redirect to the appropriate stable version - let sidebar_contents = - sidebar_contents.replace("/docs", &format!("{}/{}/docs/{}", get_path_prefix_server(), &locale, &version)); + let sidebar_contents = sidebar_contents.replace( + "/docs", + &format!("{}/{}/docs/{}", get_path_prefix_server(), &locale, &version), + ); let sidebar_html_contents = parse_md_to_html(&sidebar_contents); // Work out the status of this page