polyphony-chat / chorus

A Rust library for interacting with multiple Polyphony- and Spacebar-Compatible instances at once.
https://crates.io/crates/chorus
Mozilla Public License 2.0
17 stars 7 forks source link

Prefer `&str` over `String` when possible #553

Closed bitfl0wer closed 2 months ago

bitfl0wer commented 2 months ago

When I started Rust and didn't know lifetimes, I used String over &str everywhere, because it was easier to work with. This makes for very annoying API though. This PR changes String arguments in function headers to be &str, if possible. Should also make for some minor performance gains, even though this is not the goal