Skip to content

Commit edfa5f9

Browse files
committed
Correct maximum word length
1 parent 2f8de8d commit edfa5f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ _hypher_ separates words into syllables.
66
efficiently encoded finite automata at build time.
77
- Zero load time: Hyphenation automata operate directly over the embedded
88
binary data with no up-front decoding.
9-
- No allocations unless when hyphenating very long words (>= 39 bytes). You can
9+
- No allocations unless when hyphenating very long words (> 41 bytes). You can
1010
disable the `alloc` feature, but then overly long words lead to a panic.
1111
- Support for many languages.
1212
- No unsafe code, no dependencies, no std.
@@ -72,7 +72,7 @@ include!("lang.rs");
7272
///
7373
/// # Panics
7474
///
75-
/// Panics if the word is more than 38 bytes long and the `alloc` feature is
75+
/// Panics if the word is more than 41 bytes long and the `alloc` feature is
7676
/// disabled.
7777
///
7878
/// # Example
@@ -279,7 +279,7 @@ impl Bytes {
279279
Self::Array([0; 40].into_iter(), len)
280280
} else {
281281
#[cfg(not(feature = "alloc"))]
282-
panic!("hypher: maximum word length is 39 when `alloc` is disabled");
282+
panic!("hypher: maximum word length is 41 when `alloc` is disabled");
283283

284284
#[cfg(feature = "alloc")]
285285
Self::Vec(alloc::vec![0; len].into_iter())

0 commit comments

Comments
 (0)