From b9cca9eca0a2b8466a256f0a31110b4902848382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 11 Dec 2020 12:24:05 +0200 Subject: [PATCH] impl WordSplitter for Box and for Send + Sync --- src/splitting.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/splitting.rs b/src/splitting.rs index fbb06396..89a42dca 100644 --- a/src/splitting.rs +++ b/src/splitting.rs @@ -36,6 +36,21 @@ impl WordSplitter for Box { self.deref().split_points(word) } } + +impl WordSplitter for Box { + fn split_points(&self, word: &str) -> Vec { + use std::ops::Deref; + self.deref().split_points(word) + } +} + +impl WordSplitter for Box { + fn split_points(&self, word: &str) -> Vec { + use std::ops::Deref; + self.deref().split_points(word) + } +} + /* Alternative, also adds impls for specific Box i.e. Box impl WordSplitter for Box { fn split<'w>(&self, word: &'w str) -> Vec<(&'w str, &'w str, &'w str)> {