Restructure config file

This commit is contained in:
Joscha 2023-08-17 00:28:58 +02:00
parent 225250ed4e
commit a54e842478
18 changed files with 258 additions and 216 deletions

View file

@ -1,6 +1,6 @@
use std::fmt;
use crate::config::Config;
use crate::config::ServerConfig;
use super::{
paths::{PathGraph, PathIndex, PathQueue},
@ -27,7 +27,7 @@ pub struct Base {
}
impl Base {
pub fn new(config: &Config, tab: Tab) -> Self {
pub fn new(config: &ServerConfig, tab: Tab) -> Self {
let tab = match tab {
Tab::None => "",
Tab::Index => "index",
@ -53,7 +53,7 @@ impl Base {
Link(format!("{base}{to}"))
}
pub fn link_with_config<P: fmt::Display>(config: &Config, to: P) -> Link {
pub fn link_with_config<P: fmt::Display>(config: &ServerConfig, to: P) -> Link {
Self::link_with_base(&config.web_base, to)
}