Skip to content

Commit

Permalink
Merge pull request #257 from artichoke/lopopolo/rust-1.75-clippy
Browse files Browse the repository at this point in the history
Fix clippy lint failures for Rust 1.75.0, relax trait bounds on `impl IntoIterator for &SymbolTable`
  • Loading branch information
lopopolo authored Jan 3, 2024
2 parents 6a22a90 + a35f782 commit f0f01e0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl<'a> Iterator for Iter<'a> {

impl<'a> FusedIterator for Iter<'a> {}

impl<'a> IntoIterator for &'a SymbolTable {
impl<'a, S> IntoIterator for &'a SymbolTable<S> {
type Item = (Symbol, &'a [u8]);
type IntoIter = Iter<'a>;

Expand Down
4 changes: 2 additions & 2 deletions src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ mod tests {
#[cfg(target_pointer_width = "64")]
{
Symbol::try_from(usize::MAX).unwrap_err();
Symbol::try_from(u64::try_from(u32::MAX).unwrap() + 1).unwrap_err();
Symbol::try_from(u64::from(u32::MAX) + 1).unwrap_err();
}
}

Expand All @@ -281,7 +281,7 @@ mod tests {
#[cfg(target_pointer_width = "64")]
{
Symbol::try_from(&usize::MAX).unwrap_err();
Symbol::try_from(&(u64::try_from(u32::MAX).unwrap() + 1)).unwrap_err();
Symbol::try_from(&(u64::from(u32::MAX) + 1)).unwrap_err();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/cstr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl<'a> Iterator for Iter<'a> {

impl<'a> FusedIterator for Iter<'a> {}

impl<'a> IntoIterator for &'a SymbolTable {
impl<'a, S> IntoIterator for &'a SymbolTable<S> {
type Item = (Symbol, &'a CStr);
type IntoIter = Iter<'a>;

Expand Down
2 changes: 1 addition & 1 deletion src/osstr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl<'a> Iterator for Iter<'a> {

impl<'a> FusedIterator for Iter<'a> {}

impl<'a> IntoIterator for &'a SymbolTable {
impl<'a, S> IntoIterator for &'a SymbolTable<S> {
type Item = (Symbol, &'a OsStr);
type IntoIter = Iter<'a>;

Expand Down
2 changes: 1 addition & 1 deletion src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl<'a> Iterator for Iter<'a> {

impl<'a> FusedIterator for Iter<'a> {}

impl<'a> IntoIterator for &'a SymbolTable {
impl<'a, S> IntoIterator for &'a SymbolTable<S> {
type Item = (Symbol, &'a Path);
type IntoIter = Iter<'a>;

Expand Down
2 changes: 1 addition & 1 deletion src/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl<'a> Iterator for Iter<'a> {

impl<'a> FusedIterator for Iter<'a> {}

impl<'a> IntoIterator for &'a SymbolTable {
impl<'a, S> IntoIterator for &'a SymbolTable<S> {
type Item = (Symbol, &'a str);
type IntoIter = Iter<'a>;

Expand Down

0 comments on commit f0f01e0

Please sign in to comment.