Skip to content

Commit 87624ad

Browse files
authored
Merge pull request #98 from timClicks/add-debug-impls
Implement Debug for Graphemes (#95)
2 parents 573b7bb + b4000ef commit 87624ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/grapheme.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<'a> DoubleEndedIterator for GraphemeIndices<'a> {
7373
///
7474
/// [`graphemes`]: trait.UnicodeSegmentation.html#tymethod.graphemes
7575
/// [`UnicodeSegmentation`]: trait.UnicodeSegmentation.html
76-
#[derive(Clone)]
76+
#[derive(Clone, Debug)]
7777
pub struct Graphemes<'a> {
7878
string: &'a str,
7979
cursor: GraphemeCursor,
@@ -148,7 +148,7 @@ pub fn new_grapheme_indices<'b>(s: &'b str, is_extended: bool) -> GraphemeIndice
148148

149149
// maybe unify with PairResult?
150150
// An enum describing information about a potential boundary.
151-
#[derive(PartialEq, Eq, Clone)]
151+
#[derive(PartialEq, Eq, Clone, Debug)]
152152
enum GraphemeState {
153153
// No information is known.
154154
Unknown,
@@ -165,7 +165,7 @@ enum GraphemeState {
165165
}
166166

167167
/// Cursor-based segmenter for grapheme clusters.
168-
#[derive(Clone)]
168+
#[derive(Clone, Debug)]
169169
pub struct GraphemeCursor {
170170
// Current cursor position.
171171
offset: usize,

0 commit comments

Comments
 (0)