aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/line_ending.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-06-20 23:13:59 +0000
committerNathan Vegdahl2021-06-20 23:13:59 +0000
commit3d3149e0d55f54440fa28a446ef3facdb386e5c1 (patch)
treef49f4f124ca57d01c2508d9023c8f9e3c79dc35b /helix-core/src/line_ending.rs
parente686c3e4626fdafbcc2dab9d381eba83a5f6f974 (diff)
Silence clippy warning.
Diffstat (limited to 'helix-core/src/line_ending.rs')
-rw-r--r--helix-core/src/line_ending.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-core/src/line_ending.rs b/helix-core/src/line_ending.rs
index c4636c63..3055c96e 100644
--- a/helix-core/src/line_ending.rs
+++ b/helix-core/src/line_ending.rs
@@ -56,6 +56,10 @@ impl LineEnding {
}
}
+ // Normally we'd want to implement the FromStr trait, but in this case
+ // that would force us into a different return type than from_char or
+ // or from_rope_slice, which would be weird.
+ #[allow(clippy::should_implement_trait)]
#[inline]
pub fn from_str(g: &str) -> Option<LineEnding> {
match g {