Skip to content

Commit bc7be32

Browse files
committed
Remove unnecessary call to String::from
Clippy emits: warning: useless conversion to the same type: `std::string::String` As suggested, remove the useless call to `String::from`
1 parent 35015bf commit bc7be32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/miniscript/lex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub fn lex(script: &'_ script::Script) -> Result<Vec<Token<'_>>, Error> {
206206
Some(op @ &Token::Equal)
207207
| Some(op @ &Token::CheckSig)
208208
| Some(op @ &Token::CheckMultiSig) => {
209-
return Err(Error::NonMinimalVerify(String::from(format!("{:?}", op))))
209+
return Err(Error::NonMinimalVerify(format!("{:?}", op)))
210210
}
211211
_ => {}
212212
}

0 commit comments

Comments
 (0)