Skip to content

Commit

Permalink
impl default for all iterator types
Browse files Browse the repository at this point in the history
Addresses clippy lint `clippy::new_without_default`
  • Loading branch information
lopopolo committed May 8, 2024
1 parent 615696e commit 5f46e70
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lowercase/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ pub struct Lowercase<'a> {
iter: Inner<'a>,
}

impl<'a> Default for Lowercase<'a> {
fn default() -> Self {
Self::new()
}
}

impl<'a> Lowercase<'a> {
/// Create a new, empty lowercase iterator.
///
Expand Down
6 changes: 6 additions & 0 deletions src/titlecase/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ pub struct Titlecase<'a> {
iter: Inner<'a>,
}

impl<'a> Default for Titlecase<'a> {
fn default() -> Self {
Self::new()
}
}

impl<'a> Titlecase<'a> {
/// Create a new, empty titlecase iterator.
///
Expand Down
6 changes: 6 additions & 0 deletions src/uppercase/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ pub struct Uppercase<'a> {
iter: Inner<'a>,
}

impl<'a> Default for Uppercase<'a> {
fn default() -> Self {
Self::new()
}
}

impl<'a> Uppercase<'a> {
/// Create a new, empty uppercase iterator.
///
Expand Down

0 comments on commit 5f46e70

Please sign in to comment.