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 config::Config;
use template::Template;
use renderer;
use logger::{LogLevel, Logger};
use error::Error;
use options::{BuildOpt, Opt};
use file_writer;
use crate::config::Config;
use crate::template::Template;
use crate::renderer;
use crate::logger::{LogLevel, Logger};
use crate::error::Error;
use crate::options::{BuildOpt, Opt};
use crate::file_writer;
const DEFAULT_CSS: &'static str = include_str!("templates/default-css.css");
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 error::Error;
use logger::LogLevel;
use crate::error::Error;
use crate::logger::LogLevel;
#[derive(Clone)]
pub struct SinglePageConfigs {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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