mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-11 02:56:38 -07:00
fix unused warnings when building without default features
This commit is contained in:
parent
f53cd56c39
commit
f4a2708794
3 changed files with 13 additions and 14 deletions
|
@ -19,10 +19,19 @@ use warp::{
|
|||
};
|
||||
|
||||
use crate::{
|
||||
resource::RESOURCES_PATH, util::get_name, Site, SiteBuilder, PAGES_PATH, ROOT_PATH, SASS_PATH,
|
||||
TEMPLATES_PATH,
|
||||
resource::RESOURCES_PATH, Site, SiteBuilder, PAGES_PATH, ROOT_PATH, SASS_PATH, TEMPLATES_PATH,
|
||||
};
|
||||
|
||||
/// Helper to get the "name" of a path.
|
||||
fn get_name(path: &Path) -> (PathBuf, String) {
|
||||
let name = path.with_extension("");
|
||||
let name_str = name
|
||||
.display()
|
||||
.to_string()
|
||||
.replace(std::path::MAIN_SEPARATOR, "/");
|
||||
(name, name_str)
|
||||
}
|
||||
|
||||
fn with_build_path(
|
||||
build_path: PathBuf,
|
||||
) -> impl Filter<Extract = (PathBuf,), Error = std::convert::Infallible> + Clone {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue