From b5a6a34bdd642ea2d89f984fb50f4371365c9b93 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 21 May 2020 23:04:39 +0200 Subject: Cast empty arrays to slice to get around clippy --- askama_shared/src/parser.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'askama_shared') diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs index b7a9851..10c4ce8 100644 --- a/askama_shared/src/parser.rs +++ b/askama_shared/src/parser.rs @@ -124,7 +124,6 @@ where } } -#[allow(clippy::reversed_empty_ranges)] fn split_ws_parts(s: &[u8]) -> Node { if s.is_empty() { let rs = str::from_utf8(s).unwrap(); @@ -138,10 +137,10 @@ fn split_ws_parts(s: &[u8]) -> Node { if let Some(end) = end { (&s[..start], &s[start..=end], &s[end + 1..]) } else { - (&s[..start], &s[start..], &s[0..0]) + (&s[..start], &s[start..], &[] as &[u8]) } } else { - (s, &s[0..0], &s[0..0]) + (s, &[] as &[u8], &[] as &[u8]) }; Node::Lit( -- cgit