Skip to content

Commit 1c86b37

Browse files
committed
Fixed clippy lints in checked_conversions.rs.
1 parent 14d948c commit 1c86b37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/checked_conversions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! lint on manually implemented checked conversions that could be transformed into try_from
1+
//! lint on manually implemented checked conversions that could be transformed into `try_from`
22
33
use if_chain::if_chain;
44
use rustc::hir::*;
@@ -61,7 +61,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CheckedConversions {
6161
item.span,
6262
&format!(
6363
"Checked cast can be simplified: `{}::try_from`",
64-
cv.to_type.unwrap_or("IntegerType".to_string()),
64+
cv.to_type.unwrap_or_else(|| "IntegerType".to_string()),
6565
),
6666
);
6767
}
@@ -299,7 +299,7 @@ fn int_ty_to_str(path: &QPath) -> Option<&str> {
299299

300300
then {
301301
INT_TYPES
302-
.into_iter()
302+
.iter()
303303
.find(|c| (&ty.ident.name) == *c)
304304
.cloned()
305305
} else {

0 commit comments

Comments
 (0)