diff options
| author | Maxwell Anderson <maxwell.brayden.anderson@gmail.com> | 2018-10-31 18:09:56 -0600 |
|---|---|---|
| committer | Maxwell Anderson <maxwell.brayden.anderson@gmail.com> | 2018-10-31 18:09:56 -0600 |
| commit | 98ce3348d9c066bf08892bd320620cab10266ee9 (patch) | |
| tree | 816899ca0cc480957dabf7d0367f8e19cdd92c1f | |
| parent | 3c22b2314ca056f043f48610ddd892be37e72842 (diff) | |
| download | rust-98ce3348d9c066bf08892bd320620cab10266ee9.tar.gz rust-98ce3348d9c066bf08892bd320620cab10266ee9.zip | |
change single char str to char
| -rw-r--r-- | clippy_lints/src/literal_representation.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/literal_representation.rs b/clippy_lints/src/literal_representation.rs index d9be99042c3..9c319d64b32 100644 --- a/clippy_lints/src/literal_representation.rs +++ b/clippy_lints/src/literal_representation.rs @@ -229,8 +229,8 @@ impl<'a> DigitInfo<'a> { None => String::new(), }; format!("{}.{}{}", int_part_hint, frac_part_hint, suffix_hint) - } else if self.float && (self.digits.contains("E") || self.digits.contains("E")) { - let which_e = if self.digits.contains("E") { "E" } else { "e" }; + } else if self.float && (self.digits.contains('E') || self.digits.contains('E')) { + let which_e = if self.digits.contains('E') { 'E' } else { 'e' }; let parts: Vec<&str> = self.digits.split(which_e).collect(); let filtered_digits_vec_0 = parts[0].chars().filter(|&c| c != '_').rev().collect::<Vec<_>>(); let filtered_digits_vec_1 = parts[1].chars().filter(|&c| c != '_').rev().collect::<Vec<_>>(); |
