Issue Description
Cloning the span for src.get may be unnecessary.
Consider using a reference or passing Span by value if it implements Copy, as this may improve performance and code clarity.
Location
src/parser/cst_builder/tree.rs:117
Code Context
fn push_token(builder: &mut GreenNodeBuilder, kind: SyntaxKind, span: Span, src: &str) {
let text = src.get(span.clone()).map_or_else(
|| {
Suggested Improvement
Consider whether span.clone() is necessary or if span can be used directly, especially if Span implements Copy.
References
Issue Description
Cloning the span for src.get may be unnecessary.
Consider using a reference or passing Span by value if it implements Copy, as this may improve performance and code clarity.
Location
src/parser/cst_builder/tree.rs:117Code Context
Suggested Improvement
Consider whether
span.clone()is necessary or ifspancan be used directly, especially ifSpanimplementsCopy.References