aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-12-07 15:52:26 +0100
committerLibravatar Juan Aguilar <mhpoin@gmail.com>2018-12-08 21:43:20 +0100
commit5549f9a3cd94e3cd6700067b1c74194dadb58a0f (patch)
treefa7037a3d4884a8c76ab7b4bea6d42b0bde0ff91 /askama_derive/src
parentd042c5d758a0b99288b99959d5d98462f18cde65 (diff)
downloadaskama-5549f9a3cd94e3cd6700067b1c74194dadb58a0f.tar.gz
askama-5549f9a3cd94e3cd6700067b1c74194dadb58a0f.tar.bz2
askama-5549f9a3cd94e3cd6700067b1c74194dadb58a0f.zip
Use 2018 edition idioms
Diffstat (limited to 'askama_derive/src')
-rw-r--r--askama_derive/src/generator.rs2
-rw-r--r--askama_derive/src/input.rs2
-rw-r--r--askama_derive/src/lib.rs7
-rw-r--r--askama_derive/src/parser.rs4
4 files changed, 6 insertions, 9 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index dc1c551..61a82bd 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -1,7 +1,7 @@
use super::{get_template_source, Context, Heritage};
use crate::input::TemplateInput;
use crate::parser::{Cond, Expr, MatchParameter, MatchVariant, Node, Target, When, WS};
-use crate::shared::filters;
+use askama_shared::filters;
use proc_macro2::Span;
diff --git a/askama_derive/src/input.rs b/askama_derive/src/input.rs
index f79186d..72d5d20 100644
--- a/askama_derive/src/input.rs
+++ b/askama_derive/src/input.rs
@@ -2,7 +2,7 @@ use proc_macro2::TokenStream;
use quote::ToTokens;
-use crate::shared::{Config, Syntax};
+use askama_shared::{Config, Syntax};
use std::path::PathBuf;
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index d6900d7..cf5ead9 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -1,11 +1,8 @@
-extern crate askama_shared as shared;
+extern crate proc_macro;
#[macro_use]
extern crate nom;
-extern crate proc_macro;
-extern crate proc_macro2;
#[macro_use]
extern crate quote;
-extern crate syn;
mod generator;
mod input;
@@ -13,7 +10,7 @@ mod parser;
use crate::input::{Print, Source, TemplateInput};
use crate::parser::{Expr, Macro, Node};
-use crate::shared::{read_config_file, Config};
+use askama_shared::{read_config_file, Config};
use proc_macro::TokenStream;
use crate::parser::parse;
diff --git a/askama_derive/src/parser.rs b/askama_derive/src/parser.rs
index 08013e9..e1a7fc0 100644
--- a/askama_derive/src/parser.rs
+++ b/askama_derive/src/parser.rs
@@ -4,7 +4,7 @@
use nom;
use std::str;
-use crate::shared::Syntax;
+use askama_shared::Syntax;
#[derive(Debug)]
pub enum Expr<'a> {
@@ -771,7 +771,7 @@ pub fn parse<'a>(src: &'a str, syntax: &'a Syntax<'a>) -> Vec<Node<'a>> {
#[cfg(test)]
mod tests {
- use crate::shared::Syntax;
+ use askama_shared::Syntax;
fn check_ws_split(s: &str, res: &(&str, &str, &str)) {
let node = super::split_ws_parts(s.as_bytes());