You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Appears to be some kind of broken bot. The issue in question can be found by clippy, and even if you fix the broken URL you will find that it does not apply to the file in question. (I believe it did prior to #252 nearly two years ago.)
Can cause major performance issues.
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
https://github.com/rust-bitcoincore-rpc/blob/master/client/src/client.rs#L212-L212
The text was updated successfully, but these errors were encountered: