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
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
The text was updated successfully, but these errors were encountered: