aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_shared/src/lib.rs51
1 files changed, 0 insertions, 51 deletions
diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs
index a3ee4c1..cb26406 100644
--- a/askama_shared/src/lib.rs
+++ b/askama_shared/src/lib.rs
@@ -3,23 +3,14 @@
#![deny(elided_lifetimes_in_paths)]
#![deny(unreachable_pub)]
-use std::borrow::Cow;
use std::fmt;
-pub use crate::generator::derive_template;
-pub use crate::input::extension_to_mime_type;
pub use askama_escape::MarkupDisplay;
-use proc_macro2::{Span, TokenStream};
-mod config;
mod error;
pub use crate::error::{Error, Result};
pub mod filters;
-mod generator;
pub mod helpers;
-mod heritage;
-mod input;
-mod parser;
/// Main `Template` trait; implementations are generally derived
///
@@ -107,48 +98,6 @@ impl fmt::Display for dyn DynTemplate {
}
}
-#[derive(Debug, Clone)]
-struct CompileError {
- msg: Cow<'static, str>,
- span: Span,
-}
-
-impl CompileError {
- fn new<S: Into<Cow<'static, str>>>(s: S, span: Span) -> Self {
- Self {
- msg: s.into(),
- span,
- }
- }
-
- fn into_compile_error(self) -> TokenStream {
- syn::Error::new(self.span, self.msg).to_compile_error()
- }
-}
-
-impl std::error::Error for CompileError {}
-
-impl fmt::Display for CompileError {
- #[inline]
- fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
- fmt.write_str(&self.msg)
- }
-}
-
-impl From<&'static str> for CompileError {
- #[inline]
- fn from(s: &'static str) -> Self {
- Self::new(s, Span::call_site())
- }
-}
-
-impl From<String> for CompileError {
- #[inline]
- fn from(s: String) -> Self {
- Self::new(s, Span::call_site())
- }
-}
-
#[cfg(test)]
#[allow(clippy::blacklisted_name)]
mod tests {