Skip to content

Commit c4ab53e

Browse files
committed
Use &str not &String
Clippy emits: warning: writing `&String` instead of `&str` involves a new object where a slice will do As suggested, use `&str` not `&String`.
1 parent b81f08c commit c4ab53e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/descriptor/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ impl Descriptor<DescriptorPublicKey> {
596596
s: &str,
597597
) -> Result<(Descriptor<DescriptorPublicKey>, KeyMap), Error> {
598598
fn parse_key<C: secp256k1::Signing>(
599-
s: &String,
599+
s: &str,
600600
key_map: &mut KeyMap,
601601
secp: &secp256k1::Secp256k1<C>,
602602
) -> Result<DescriptorPublicKey, Error> {

0 commit comments

Comments
 (0)