1
Fork 0

use push(char) instead of push_str(&str) to add single chars to strings

clippy::single-char-push-str
This commit is contained in:
Matthias Krüger 2020-09-10 13:57:40 +02:00
parent e11c667e4a
commit 9bb10cc907
11 changed files with 31 additions and 29 deletions

View file

@ -1076,7 +1076,7 @@ fn exec_linker(
}
.to_string(),
);
args.push_str("\n");
args.push('\n');
}
let file = tmpdir.join("linker-arguments");
let bytes = if sess.target.target.options.is_like_msvc {

View file

@ -37,7 +37,7 @@ pub fn push_debuginfo_type_name<'tcx>(
ty::Bool => output.push_str("bool"),
ty::Char => output.push_str("char"),
ty::Str => output.push_str("str"),
ty::Never => output.push_str("!"),
ty::Never => output.push('!'),
ty::Int(int_ty) => output.push_str(int_ty.name_str()),
ty::Uint(uint_ty) => output.push_str(uint_ty.name_str()),
ty::Float(float_ty) => output.push_str(float_ty.name_str()),