Skip to content

Conversation

@Forostovec
Copy link

Motivation

In blocks.rs::render(), there are unnecessary allocations due to .to_string()on existing String.

Description

Replaced .to_string() calls on existing String values with borrowed references when building Spans in
BlocksTable::render() (crates/l2/monitor/widget/blocks.rs).
This avoids unnecessary allocations and copies at render time. ratatui’s Span::styled takes Into<Cow<'_, str>>, so &String/&str can be used directly. Aligned with existing usage in mempool.rs.

@Forostovec Forostovec requested a review from a team as a code owner November 5, 2025 22:45
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.

1 participant