andygrove opened a new pull request, #2178:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2178

   ## Summary
   
   Replace `String::from() + &str` concatenation with `format!()` macro for 
placeholder token construction.
   
   **Before:**
   ```rust
   Token::Placeholder(String::from("?") + &s)
   Token::Placeholder(String::from("$") + &value)
   ```
   
   **After:**
   ```rust
   Token::Placeholder(format!("?{s}"))
   Token::Placeholder(format!("${value}"))
   ```
   
   The `format!()` macro calculates the required capacity upfront and allocates 
once, avoiding potential reallocation when the appended string exceeds the 
initial small capacity of `String::from("?")`.
   
   ## Test plan
   
   - [x] All existing tests pass
   - [x] `cargo clippy` passes
   
   🤖 Generated with [Claude Code](https://claude.ai/code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to