remove unnecessary library
This commit is contained in:
parent
0fc188dbb8
commit
90ac6e07c9
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -317,12 +317,6 @@ dependencies = [
|
||||||
"crypto-common",
|
"crypto-common",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "either"
|
|
||||||
version = "1.10.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "equivalent"
|
name = "equivalent"
|
||||||
version = "1.0.1"
|
version = "1.0.1"
|
||||||
|
@ -826,7 +820,6 @@ name = "roxy_cli"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"either",
|
|
||||||
"glob",
|
"glob",
|
||||||
"roxy_core",
|
"roxy_core",
|
||||||
"roxy_markdown_parser",
|
"roxy_markdown_parser",
|
||||||
|
|
|
@ -15,5 +15,4 @@ clap = { version = "4.4.17", features = ["derive"] }
|
||||||
toml = "0.8.8"
|
toml = "0.8.8"
|
||||||
tera = "1.19.1"
|
tera = "1.19.1"
|
||||||
serde = "1.0.195"
|
serde = "1.0.195"
|
||||||
either = "1.10.0"
|
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ impl<I: Iterator, F: FnMut(&V, &I::Item) -> V, V: Clone> Iterator for MapFold<I,
|
||||||
trait MapFoldExt {
|
trait MapFoldExt {
|
||||||
type Item;
|
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
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
F: FnMut(&B, &Self::Item) -> B,
|
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
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ use std::{
|
||||||
io::{BufReader, Read},
|
io::{BufReader, Read},
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
|
||||||
use syntect::{highlighting::ThemeSet, parsing::SyntaxSet};
|
use syntect::{highlighting::ThemeSet, parsing::SyntaxSet};
|
||||||
use toml::Table;
|
use toml::Table;
|
||||||
|
|
||||||
|
@ -72,7 +73,6 @@ fn context_from_meta_files<'a, T: AsRef<Path>>(
|
||||||
let mut context = Context::new();
|
let mut context = Context::new();
|
||||||
|
|
||||||
for path in files {
|
for path in files {
|
||||||
//println!("{path:?}");
|
|
||||||
let mut buf = Vec::new();
|
let mut buf = Vec::new();
|
||||||
|
|
||||||
let mut file = File::open(path).map(BufReader::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 tera = tera::Tera::default();
|
||||||
let mut html = TeraParser::new(&mut tera, TeraParserOptions::default());
|
let mut html = TeraParser::new(&mut tera, TeraParserOptions::default());
|
||||||
html.add_context(context.to_inner());
|
html.add_context(context.to_inner());
|
||||||
|
|
Loading…
Reference in a new issue