Skip to content

refactor: use HashMap::is_empty() instead of len() == 0#2874

Closed
strmfos wants to merge 1 commit intobluealloy:mainfrom
strmfos:main
Closed

refactor: use HashMap::is_empty() instead of len() == 0#2874
strmfos wants to merge 1 commit intobluealloy:mainfrom
strmfos:main

Conversation

@strmfos
Copy link
Copy Markdown

@strmfos strmfos commented Aug 10, 2025

Replace self.inner.len() == 0 with self.inner.is_empty() in Precompiles::is_empty() method. This follows Rust idioms and best practices, potentially improving readability and performance

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Aug 10, 2025

CodSpeed Performance Report

Merging #2874 will not alter performance

Comparing strmfos:main (f7e7a57) with main (f3c794b)

Summary

✅ 171 untouched benchmarks

rakita added a commit that referenced this pull request Aug 10, 2025
- PR #2866: Fix comment reference from calc_excess_blob_gas to calc_excess_blob_gas_osaka
- PR #2867: Remove debug macro from test code in inspector lib
- PR #2874: Replace len() == 0 with is_empty() for idiomatic Rust

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
rakita added a commit that referenced this pull request Aug 10, 2025
- PR #2866: Fix comment reference from calc_excess_blob_gas to calc_excess_blob_gas_osaka
- PR #2867: Remove debug macro from test code in inspector lib
- PR #2874: Replace len() == 0 with is_empty() for idiomatic Rust

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
@rakita
Copy link
Copy Markdown
Member

rakita commented Aug 10, 2025

Cleaned up here #2876

@rakita rakita closed this Aug 10, 2025
This was referenced Aug 8, 2025
lwedge99 pushed a commit to sentioxyz/revm that referenced this pull request Sep 16, 2025
…loy#2874 (bluealloy#2876)

- PR bluealloy#2866: Fix comment reference from calc_excess_blob_gas to calc_excess_blob_gas_osaka
- PR bluealloy#2867: Remove debug macro from test code in inspector lib
- PR bluealloy#2874: Replace len() == 0 with is_empty() for idiomatic Rust

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants