From fd4fd12fa3dd565b56edb395bd625b0d2ec8ad46 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 6 May 2021 17:20:00 +0900 Subject: clippy lint --- helix-view/src/editor.rs | 2 +- helix-view/src/theme.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'helix-view') diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 44014e83..83208f78 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -30,7 +30,7 @@ impl Editor { let toml = config .as_deref() .unwrap_or(include_bytes!("../../theme.toml")); - let theme: Theme = toml::from_slice(&toml).expect("failed to parse theme.toml"); + let theme: Theme = toml::from_slice(toml).expect("failed to parse theme.toml"); let language_servers = helix_lsp::Registry::new(); diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs index ec7c746a..8b695898 100644 --- a/helix-view/src/theme.rs +++ b/helix-view/src/theme.rs @@ -92,7 +92,7 @@ pub struct Theme { } impl<'de> Deserialize<'de> for Theme { - fn deserialize(deserializer: D) -> Result + fn deserialize(deserializer: D) -> Result where D: Deserializer<'de>, { @@ -110,7 +110,7 @@ impl<'de> Deserialize<'de> for Theme { } let scopes = styles.keys().map(ToString::to_string).collect(); - Ok(Theme { scopes, styles }) + Ok(Self { scopes, styles }) } } -- cgit v1.2.3-70-g09d2