Run cargo fix --edition

This commit is contained in:
Sofia 2024-11-21 21:00:26 +02:00
parent 9723d877cd
commit 1d9aa7aca6
9 changed files with 30 additions and 30 deletions

View File

@ -6,13 +6,13 @@ use std::error::Error as STDError;
use pathdiff; use pathdiff;
use config::Config; use crate::config::Config;
use template::Template; use crate::template::Template;
use renderer; use crate::renderer;
use logger::{LogLevel, Logger}; use crate::logger::{LogLevel, Logger};
use error::Error; use crate::error::Error;
use options::{BuildOpt, Opt}; use crate::options::{BuildOpt, Opt};
use file_writer; use crate::file_writer;
const DEFAULT_CSS: &'static str = include_str!("templates/default-css.css"); const DEFAULT_CSS: &'static str = include_str!("templates/default-css.css");
const DEFAULT_JS: &'static str = include_str!("templates/default-js.js"); const DEFAULT_JS: &'static str = include_str!("templates/default-js.js");

View File

@ -1,7 +1,7 @@
use config_toml::{GlobalConfigToml, PageConfigToml}; use crate::config_toml::{GlobalConfigToml, PageConfigToml};
use std::path::PathBuf; use std::path::PathBuf;
use error::Error; use crate::error::Error;
use logger::LogLevel; use crate::logger::LogLevel;
#[derive(Clone)] #[derive(Clone)]
pub struct SinglePageConfigs { pub struct SinglePageConfigs {

View File

@ -1,8 +1,8 @@
use std::path::PathBuf; use std::path::PathBuf;
use std::collections::HashMap; use std::collections::HashMap;
use error::Error; use crate::error::Error;
use file_writer; use crate::file_writer;
#[derive(Deserialize, Serialize, Clone, Debug)] #[derive(Deserialize, Serialize, Clone, Debug)]
pub struct GlobalConfigToml { pub struct GlobalConfigToml {

View File

@ -2,7 +2,7 @@ use std::convert::From;
use std::io::Error as IOError; use std::io::Error as IOError;
use std::error::Error as STDError; use std::error::Error as STDError;
use logger::LogLevel; use crate::logger::LogLevel;
#[derive(Debug)] #[derive(Debug)]
pub struct Error { pub struct Error {

View File

@ -7,8 +7,8 @@ use serde::Serialize;
use serde::de::DeserializeOwned; use serde::de::DeserializeOwned;
use toml; use toml;
use error::Error; use crate::error::Error;
use logger::LogLevel; use crate::logger::LogLevel;
pub fn add_to_beginning<T: Into<String>>(path: PathBuf, to_add: T) -> PathBuf { pub fn add_to_beginning<T: Into<String>>(path: PathBuf, to_add: T) -> PathBuf {
Path::new(&to_add.into()).join(path) Path::new(&to_add.into()).join(path)

View File

@ -26,9 +26,9 @@ use std::process::exit;
use structopt::StructOpt; use structopt::StructOpt;
use logger::{LogLevel, Logger}; use crate::logger::{LogLevel, Logger};
use options::{Opt, Subcommands}; use crate::options::{Opt, Subcommands};
use config_toml::{GlobalConfigToml, NavbarConfig, NavbarItem, WebsiteConfig}; use crate::config_toml::{GlobalConfigToml, NavbarConfig, NavbarItem, WebsiteConfig};
//TODO: Custom markdown //TODO: Custom markdown
fn main() { fn main() {

View File

@ -1,10 +1,10 @@
use std::path::PathBuf; use std::path::PathBuf;
use options::{NewOpt, Opt}; use crate::options::{NewOpt, Opt};
use logger::{LogLevel, Logger}; use crate::logger::{LogLevel, Logger};
use file_writer; use crate::file_writer;
use error::Error; use crate::error::Error;
use config_toml::{GlobalConfigToml, PageConfig, PageConfigToml}; use crate::config_toml::{GlobalConfigToml, PageConfig, PageConfigToml};
use pathdiff; use pathdiff;

View File

@ -6,11 +6,11 @@ use std::error::Error as STDError;
use pulldown_cmark::{html, Parser}; use pulldown_cmark::{html, Parser};
use regex::{Captures, Regex}; use regex::{Captures, Regex};
use config::{Config, SinglePageConfigs}; use crate::config::{Config, SinglePageConfigs};
use template::Template; use crate::template::Template;
use error::Error; use crate::error::Error;
use logger::{LogLevel, Logger}; use crate::logger::{LogLevel, Logger};
use config_toml::InjectionToml; use crate::config_toml::InjectionToml;
fn get_file_contents(path: Option<String>) -> Result<String, Error> { fn get_file_contents(path: Option<String>) -> Result<String, Error> {
match path { match path {

View File

@ -2,8 +2,8 @@ use regex::{Captures, Regex};
use std::collections::HashMap; use std::collections::HashMap;
use config::SinglePageConfigs; use crate::config::SinglePageConfigs;
use config_toml::NavbarItem; use crate::config_toml::NavbarItem;
type Data = HashMap<String, String>; type Data = HashMap<String, String>;