aboutsummaryrefslogtreecommitdiffstats
path: root/askama_escape/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_escape/src
parentd042c5d758a0b99288b99959d5d98462f18cde65 (diff)
downloadaskama-5549f9a3cd94e3cd6700067b1c74194dadb58a0f.tar.gz
askama-5549f9a3cd94e3cd6700067b1c74194dadb58a0f.tar.bz2
askama-5549f9a3cd94e3cd6700067b1c74194dadb58a0f.zip
Use 2018 edition idioms
Diffstat (limited to 'askama_escape/src')
-rw-r--r--askama_escape/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/askama_escape/src/lib.rs b/askama_escape/src/lib.rs
index b967f1f..8c23530 100644
--- a/askama_escape/src/lib.rs
+++ b/askama_escape/src/lib.rs
@@ -35,7 +35,7 @@ impl<T> Display for MarkupDisplay<T>
where
T: Display,
{
- fn fmt(&self, f: &mut Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match *self {
MarkupDisplay::Unsafe(ref t) => escape(&t.to_string()).fmt(f),
MarkupDisplay::Safe(ref t) => t.fmt(f),
@@ -43,7 +43,7 @@ where
}
}
-pub fn escape(s: &str) -> Escaped {
+pub fn escape(s: &str) -> Escaped<'_> {
Escaped {
bytes: s.as_bytes(),
}
@@ -64,7 +64,7 @@ pub struct Escaped<'a> {
}
impl<'a> ::std::fmt::Display for Escaped<'a> {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut start = 0;
for (i, b) in self.bytes.iter().enumerate() {
if b.wrapping_sub(b'"') <= FLAG {