remove unnecessary library

This commit is contained in:
KitsuneCafe 2024-02-11 00:29:14 -05:00
parent 0fc188dbb8
commit 90ac6e07c9
4 changed files with 3 additions and 13 deletions

7
Cargo.lock generated
View file

@ -317,12 +317,6 @@ dependencies = [
"crypto-common",
]
[[package]]
name = "either"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
[[package]]
name = "equivalent"
version = "1.0.1"
@ -826,7 +820,6 @@ name = "roxy_cli"
version = "0.1.0"
dependencies = [
"clap",
"either",
"glob",
"roxy_core",
"roxy_markdown_parser",

View file

@ -15,5 +15,4 @@ clap = { version = "4.4.17", features = ["derive"] }
toml = "0.8.8"
tera = "1.19.1"
serde = "1.0.195"
either = "1.10.0"

View file

@ -90,7 +90,7 @@ impl<I: Iterator, F: FnMut(&V, &I::Item) -> V, V: Clone> Iterator for MapFold<I,
trait MapFoldExt {
type Item;
fn map_fold<B, F>(mut self, init: B, f: F) -> MapFold<Self, F, B>
fn map_fold<B, F>(self, init: B, f: F) -> MapFold<Self, F, B>
where
Self: Sized,
F: FnMut(&B, &Self::Item) -> B,
@ -159,7 +159,7 @@ impl Context {
}
}
pub fn get<P: AsRef<Path>>(&self, path: &P) -> Option<&Value> {
pub fn get<P: AsRef<Path>>(&self, _path: &P) -> Option<&Value> {
None
}
}

View file

@ -19,6 +19,7 @@ use std::{
io::{BufReader, Read},
path::{Path, PathBuf},
};
use syntect::{highlighting::ThemeSet, parsing::SyntaxSet};
use toml::Table;
@ -72,7 +73,6 @@ fn context_from_meta_files<'a, T: AsRef<Path>>(
let mut context = Context::new();
for path in files {
//println!("{path:?}");
let mut buf = Vec::new();
let mut file = File::open(path).map(BufReader::new)?;
@ -155,8 +155,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
}
}
//println!("{context:?}");
let mut tera = tera::Tera::default();
let mut html = TeraParser::new(&mut tera, TeraParserOptions::default());
html.add_context(context.to_inner());