From 5c784482f6b896861c6f15c614655381c29a1857 Mon Sep 17 00:00:00 2001 From: Avril Date: Wed, 14 Oct 2020 13:29:20 +0100 Subject: [PATCH] ref lt --- src/sanitise/sentance.rs | 2 +- src/sanitise/word.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sanitise/sentance.rs b/src/sanitise/sentance.rs index dc4ee22..b9df50e 100644 --- a/src/sanitise/sentance.rs +++ b/src/sanitise/sentance.rs @@ -13,7 +13,7 @@ use std::{ #[derive(Debug)] pub struct SentanceError; -/// A sentance +/// A sentence #[derive(Debug, PartialEq, Eq)] #[repr(transparent)] pub struct Sentance(str); diff --git a/src/sanitise/word.rs b/src/sanitise/word.rs index 92f639d..36d6250 100644 --- a/src/sanitise/word.rs +++ b/src/sanitise/word.rs @@ -68,7 +68,8 @@ impl Word } /// Create a new iterator over words from this sentance. - pub fn new_iter<'a>(from: &'a (impl AsRef +?Sized+'a)) -> impl Iterator + pub fn new_iter<'a, 'b>(from: &'a (impl AsRef +?Sized+'b)) -> impl Iterator + where 'b: 'a { let from = from.as_ref(); from.split_inclusive(is_word_boundary)