diff options
author | Blaž Hrastnik | 2021-05-06 08:20:00 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-05-06 08:20:00 +0000 |
commit | fd4fd12fa3dd565b56edb395bd625b0d2ec8ad46 (patch) | |
tree | 6c6ecf7777cb9eb7d9943122073a8a8e950abcbb /helix-view | |
parent | ba970054957238cb682ae3be022b675131beb6f8 (diff) |
clippy lint
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/src/editor.rs | 2 | ||||
-rw-r--r-- | helix-view/src/theme.rs | 4 |
2 files changed, 3 insertions, 3 deletions
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<D>(deserializer: D) -> Result<Theme, D::Error> + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> 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 }) } } |