summaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-01 18:57:12 +0000
committerNathan Vegdahl2021-07-02 02:06:52 +0000
commitefa3389b6aa4e07982e1e902b0173d1daa4a301e (patch)
treeea0d826cf4f191422b56ee9a5e9b7dad650af296 /helix-term/src/application.rs
parent702a0491db0fef8ee15cd6fcff3138812da2c2aa (diff)
Fix unused variable, parameter, and `mut` warnings in helix-term.
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs19
1 files changed, 11 insertions, 8 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 1939e88c..e75b0ecb 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -25,7 +25,14 @@ pub struct Application {
// TODO should be separate to take only part of the config
config: Config,
+ // Currently never read from. Remove the `allow(dead_code)` when
+ // that changes.
+ #[allow(dead_code)]
theme_loader: Arc<theme::Loader>,
+
+ // Currently never read from. Remove the `allow(dead_code)` when
+ // that changes.
+ #[allow(dead_code)]
syn_loader: Arc<syntax::Loader>,
jobs: Jobs,
@@ -33,7 +40,7 @@ pub struct Application {
}
impl Application {
- pub fn new(mut args: Args, mut config: Config) -> Result<Self, Error> {
+ pub fn new(args: Args, mut config: Config) -> Result<Self, Error> {
use helix_view::editor::Action;
let mut compositor = Compositor::new()?;
let size = compositor.size();
@@ -66,7 +73,7 @@ impl Application {
let mut editor = Editor::new(size, theme_loader.clone(), syn_loader.clone());
- let mut editor_view = Box::new(ui::EditorView::new(std::mem::take(&mut config.keys)));
+ let editor_view = Box::new(ui::EditorView::new(std::mem::take(&mut config.keys)));
compositor.push(editor_view);
if !args.files.is_empty() {
@@ -91,7 +98,7 @@ impl Application {
editor.set_theme(theme);
- let mut app = Self {
+ let app = Self {
compositor,
editor,
@@ -357,14 +364,10 @@ impl Application {
self.editor.set_status(status);
}
}
- _ => unreachable!(),
}
}
Call::MethodCall(helix_lsp::jsonrpc::MethodCall {
- method,
- params,
- jsonrpc,
- id,
+ method, params, id, ..
}) => {
let call = match MethodCall::parse(&method, params) {
Some(call) => call,