Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy lint failures for Rust 1.75.0, relax trait bounds on impl IntoIterator for &SymbolTable #257

Merged
merged 2 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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