Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit96dfef5

Browse files
authored
Merge pull request#131 from syvb/debug-pub-interfaces
Implement Debug on all public structs
2 parents8b894ca +1f88570 commit96dfef5

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

‎src/grapheme.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::tables::grapheme::GraphemeCat;
1919
///
2020
/// [`grapheme_indices`]: trait.UnicodeSegmentation.html#tymethod.grapheme_indices
2121
/// [`UnicodeSegmentation`]: trait.UnicodeSegmentation.html
22-
#[derive(Clone)]
22+
#[derive(Debug,Clone)]
2323
pubstructGraphemeIndices<'a>{
2424
start_offset:usize,
2525
iter:Graphemes<'a>,

‎src/sentence.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mod fwd {
1818

1919
// Describe a parsed part of source string as described in this table:
2020
// https://unicode.org/reports/tr29/#Default_Sentence_Boundaries
21-
#[derive(Clone,Copy,PartialEq,Eq)]
21+
#[derive(Debug,Clone,Copy,PartialEq,Eq)]
2222
enumStatePart{
2323
Sot,
2424
Eot,
@@ -33,7 +33,7 @@ mod fwd {
3333
STerm,
3434
}
3535

36-
#[derive(Clone,PartialEq,Eq)]
36+
#[derive(Debug,Clone,PartialEq,Eq)]
3737
structSentenceBreaksState(pub[StatePart;4]);
3838

3939
constINITIAL_STATE:SentenceBreaksState =SentenceBreaksState([
@@ -43,7 +43,7 @@ mod fwd {
4343
StatePart::Sot,
4444
]);
4545

46-
#[derive(Clone)]
46+
#[derive(Debug,Clone)]
4747
pubstructSentenceBreaks<'a>{
4848
pubstring:&'astr,
4949
pos:usize,
@@ -296,7 +296,7 @@ mod fwd {
296296
///
297297
/// [`unicode_sentences`]: trait.UnicodeSegmentation.html#tymethod.unicode_sentences
298298
/// [`UnicodeSegmentation`]: trait.UnicodeSegmentation.html
299-
#[derive(Clone)]
299+
#[derive(Debug,Clone)]
300300
pubstructUnicodeSentences<'a>{
301301
inner:Filter<USentenceBounds<'a>,fn(&&str) ->bool>,
302302
}
@@ -309,7 +309,7 @@ pub struct UnicodeSentences<'a> {
309309
///
310310
/// [`split_sentence_bounds`]: trait.UnicodeSegmentation.html#tymethod.split_sentence_bounds
311311
/// [`UnicodeSegmentation`]: trait.UnicodeSegmentation.html
312-
#[derive(Clone)]
312+
#[derive(Debug,Clone)]
313313
pubstructUSentenceBounds<'a>{
314314
iter: fwd::SentenceBreaks<'a>,
315315
sentence_start:Option<usize>,
@@ -322,7 +322,7 @@ pub struct USentenceBounds<'a> {
322322
///
323323
/// [`split_sentence_bound_indices`]: trait.UnicodeSegmentation.html#tymethod.split_sentence_bound_indices
324324
/// [`UnicodeSegmentation`]: trait.UnicodeSegmentation.html
325-
#[derive(Clone)]
325+
#[derive(Debug,Clone)]
326326
pubstructUSentenceBoundIndices<'a>{
327327
start_offset:usize,
328328
iter:USentenceBounds<'a>,

‎src/word.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ use crate::tables::word::WordCat;
2525
///
2626
/// [`unicode_words`]: trait.UnicodeSegmentation.html#tymethod.unicode_words
2727
/// [`UnicodeSegmentation`]: trait.UnicodeSegmentation.html
28+
#[derive(Debug)]
2829
pubstructUnicodeWords<'a>{
2930
inner:Filter<UWordBounds<'a>,fn(&&str) ->bool>,
3031
}
@@ -62,6 +63,7 @@ impl<'a> DoubleEndedIterator for UnicodeWords<'a> {
6263
///
6364
/// [`unicode_word_indices`]: trait.UnicodeSegmentation.html#tymethod.unicode_word_indices
6465
/// [`UnicodeSegmentation`]: trait.UnicodeSegmentation.html
66+
#[derive(Debug)]
6567
pubstructUnicodeWordIndices<'a>{
6668
inner:Filter<UWordBoundIndices<'a>,fn(&(usize,&str)) ->bool>,
6769
}
@@ -94,7 +96,7 @@ impl<'a> DoubleEndedIterator for UnicodeWordIndices<'a> {
9496
///
9597
/// [`split_word_bounds`]: trait.UnicodeSegmentation.html#tymethod.split_word_bounds
9698
/// [`UnicodeSegmentation`]: trait.UnicodeSegmentation.html
97-
#[derive(Clone)]
99+
#[derive(Debug,Clone)]
98100
pubstructUWordBounds<'a>{
99101
string:&'astr,
100102
cat:Option<WordCat>,
@@ -108,7 +110,7 @@ pub struct UWordBounds<'a> {
108110
///
109111
/// [`split_word_bound_indices`]: trait.UnicodeSegmentation.html#tymethod.split_word_bound_indices
110112
/// [`UnicodeSegmentation`]: trait.UnicodeSegmentation.html
111-
#[derive(Clone)]
113+
#[derive(Debug,Clone)]
112114
pubstructUWordBoundIndices<'a>{
113115
start_offset:usize,
114116
iter:UWordBounds<'a>,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp