Skip to content

Commit

Permalink
style: 🎨 ran cargo fmt and fixed clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-hen7 committed Oct 7, 2021
1 parent 221fa24 commit 2787a27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion website/website/src/templates/docs/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct DocsVersionSwitcherProps {
fn docs_version_switcher(props: DocsVersionSwitcherProps) -> SycamoreTemplate<G> {
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();
Expand Down
10 changes: 7 additions & 3 deletions website/website/src/templates/docs/generation.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2787a27

Please sign in to comment.