From 3d3149e0d55f54440fa28a446ef3facdb386e5c1 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Sun, 20 Jun 2021 16:13:59 -0700 Subject: [PATCH] Silence clippy warning. --- helix-core/src/line_ending.rs | 4 ++++ 1 file changed, 4 insertions(+) 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 { match g {