aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
authorNathan Vegdahl2021-06-21 19:02:44 +0000
committerNathan Vegdahl2021-06-21 19:02:44 +0000
commit7c4fa18764ed6a6c30125ed6bfc9b025216e9668 (patch)
treeeae57f3ab8f4545b6dc0a9822bcbbd9b75afdc1e /helix-core/src
parentd33355650fd53c05b4e3d4e0f421eaf013b5ea1e (diff)
Fix clippy warnings.
Diffstat (limited to 'helix-core/src')
-rw-r--r--helix-core/src/line_ending.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/helix-core/src/line_ending.rs b/helix-core/src/line_ending.rs
index 19de2231..dfc74551 100644
--- a/helix-core/src/line_ending.rs
+++ b/helix-core/src/line_ending.rs
@@ -132,19 +132,19 @@ pub fn get_line_ending(line: &RopeSlice) -> Option<LineEnding> {
pub fn get_line_ending_of_str(line: &str) -> Option<LineEnding> {
if line.ends_with("\u{000D}\u{000A}") {
Some(LineEnding::Crlf)
- } else if line.ends_with("\u{000A}") {
+ } else if line.ends_with('\u{000A}') {
Some(LineEnding::LF)
- } else if line.ends_with("\u{000B}") {
+ } else if line.ends_with('\u{000B}') {
Some(LineEnding::VT)
- } else if line.ends_with("\u{000C}") {
+ } else if line.ends_with('\u{000C}') {
Some(LineEnding::FF)
- } else if line.ends_with("\u{000D}") {
+ } else if line.ends_with('\u{000D}') {
Some(LineEnding::CR)
- } else if line.ends_with("\u{0085}") {
+ } else if line.ends_with('\u{0085}') {
Some(LineEnding::Nel)
- } else if line.ends_with("\u{2028}") {
+ } else if line.ends_with('\u{2028}') {
Some(LineEnding::LS)
- } else if line.ends_with("\u{2029}") {
+ } else if line.ends_with('\u{2029}') {
Some(LineEnding::PS)
} else {
None