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)