Closed philipjonsen closed 1 month ago
Why open an issue for this rather than just a PR?
This is a dupe of https://github.com/rust-bitcoin/rust-bitcoincore-rpc/issues/336
Not sure why these are in my notifications now. But I blocked the user who posted them from this repo
DESCRIPTION:
Certain str functions, such as .split() and .find() work on patterns that accept both string literals as well as characters. When using such functions, prefer chars over single-character string literals as they are more performant.
Replace the single-character string literal with a char.
BAD PRACTICE let x = "hello, world"; x.find("o"); // single-character str
RECOMMENDED let x = "hello, world"; x.find('o'); // use a char instead
rust-bitcoincore-rpc/blob/master/client/src/client.rs#L212-L212