Skip to content

Commit 9d857dd

Browse files
committed
Remove bounds on struct definitions
Structs don't need the bounds, only the implementations
1 parent 59f26b0 commit 9d857dd

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/fallback.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// TODO: Try boxing the closure to see if we can hide the type
22
// TODO: Or maybe use a function pointer?
33

4-
pub struct Bytes<F>
5-
where
6-
F: Fn(u8) -> bool,
7-
{
4+
pub struct Bytes<F> {
85
fallback: F,
96
}
107

src/lib.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,7 @@ macro_rules! dispatch {
180180
}
181181

182182
/// Searches a slice for a set of bytes. Up to 16 bytes may be used.
183-
pub struct Bytes<F>
184-
where
185-
F: Fn(u8) -> bool,
186-
{
183+
pub struct Bytes<F> {
187184
#[cfg(any(jetscii_sse4_2 = "yes", jetscii_sse4_2 = "maybe"))]
188185
simd: simd::Bytes,
189186

@@ -255,9 +252,7 @@ pub type BytesConst = Bytes<fn(u8) -> bool>;
255252

256253
/// Searches a string for a set of ASCII characters. Up to 16
257254
/// characters may be used.
258-
pub struct AsciiChars<F>(Bytes<F>)
259-
where
260-
F: Fn(u8) -> bool;
255+
pub struct AsciiChars<F>(Bytes<F>);
261256

262257
impl<F> AsciiChars<F>
263258
where

0 commit comments

Comments
 (0)