diff --git a/bin/src/commands/launch/error/bcle3_workshop_mod_not_found.rs b/bin/src/commands/launch/error/bcle3_workshop_mod_not_found.rs index 4b63a26d..70528f8d 100644 --- a/bin/src/commands/launch/error/bcle3_workshop_mod_not_found.rs +++ b/bin/src/commands/launch/error/bcle3_workshop_mod_not_found.rs @@ -16,7 +16,7 @@ impl Code for WorkshopModNotFound { } fn help(&self) -> Option { - Some(format!("HEMTT does not subscribe to mods, you must subscribe in Steam and allow it to download.\nWorkshop link: https://steamcommunity.com/sharedfiles/filedetails/?id={}", self.id).to_owned()) + Some(format!("HEMTT does not subscribe to mods, you must subscribe in Steam and allow it to download.\nWorkshop link: https://steamcommunity.com/sharedfiles/filedetails/?id={}", self.id)) } fn diagnostic(&self) -> Option { diff --git a/bin/src/modules/asc.rs b/bin/src/modules/asc.rs index f6dd75e1..9ba7da83 100644 --- a/bin/src/modules/asc.rs +++ b/bin/src/modules/asc.rs @@ -12,7 +12,7 @@ use hemtt_preprocessor::Processor; use rayon::prelude::{IntoParallelRefIterator, ParallelIterator}; use rust_embed::RustEmbed; use serde::Serialize; -use time::Instant; +use std::time::Instant; use crate::{context::Context, error::Error, report::Report}; @@ -136,10 +136,7 @@ impl Module for ArmaScriptCompiler { }) .collect::>()?; } - debug!( - "ASC Preprocess took {:?}", - start.elapsed().whole_milliseconds() - ); + debug!("ASC Preprocess took {:?}", start.elapsed().as_millis()); for root in root_dirs { config.add_input_dir(root.to_string()); } @@ -163,7 +160,7 @@ impl Module for ArmaScriptCompiler { warn!("ASC 'Parse Error' - check .hemttout/asc.log"); } if command.status.success() { - debug!("ASC took {:?}", start.elapsed().whole_milliseconds()); + debug!("ASC took {:?}", start.elapsed().as_millis()); } else { return Err(Error::ArmaScriptCompiler( String::from_utf8(command.stdout).expect("stdout should be valid utf8"), diff --git a/hls/src/diag_manager.rs b/hls/src/diag_manager.rs index 0e6e995a..da2b4e7b 100644 --- a/hls/src/diag_manager.rs +++ b/hls/src/diag_manager.rs @@ -43,6 +43,7 @@ impl DiagManager { } } + #[allow(dead_code)] pub fn current(&self, scope: &str, url: &Url) -> Option> { self.worker.current(scope, url) } @@ -67,6 +68,7 @@ pub struct DiagWorker { } impl DiagWorker { + #[allow(dead_code)] pub fn current(&self, scope: &str, url: &Url) -> Option> { self.current .get(&(scope.to_string(), url.clone())) diff --git a/hls/src/positions.rs b/hls/src/positions.rs index 7e87b29e..f80dcc5c 100644 --- a/hls/src/positions.rs +++ b/hls/src/positions.rs @@ -2,6 +2,7 @@ use hemtt_workspace::position::LineCol; use tower_lsp::lsp_types::Position; pub trait ToPosition { + #[allow(dead_code)] fn to_position(&self) -> Position; } diff --git a/hls/src/workspace.rs b/hls/src/workspace.rs index 63fdf8fa..29adc95a 100644 --- a/hls/src/workspace.rs +++ b/hls/src/workspace.rs @@ -159,6 +159,7 @@ impl EditorWorkspace { &self.workspace } + #[allow(dead_code)] pub fn url(&self) -> &Url { &self.url } diff --git a/libs/common/src/config/mod.rs b/libs/common/src/config/mod.rs index 06be4c99..a8007f4b 100644 --- a/libs/common/src/config/mod.rs +++ b/libs/common/src/config/mod.rs @@ -20,6 +20,6 @@ fn deprecated(file: &Path, key: &str, replacement: &str, info: Option<&str>) { key, file.display(), replacement, - info.map(|i| format!("\n {}", i)).unwrap_or_default() + info.map(|i| format!("\n {i}")).unwrap_or_default() ); } diff --git a/libs/workspace/src/reporting/processed.rs b/libs/workspace/src/reporting/processed.rs index 523a694a..fb3f3fe6 100644 --- a/libs/workspace/src/reporting/processed.rs +++ b/libs/workspace/src/reporting/processed.rs @@ -21,11 +21,13 @@ pub struct Processed { /// string offset(start, stop), source, source position mappings: Vec, + #[allow(dead_code)] #[cfg(feature = "lsp")] /// Map of token usage to definition /// (token, definition) declarations: HashMap, + #[allow(dead_code)] #[cfg(feature = "lsp")] /// Map of token definition to usage /// (definition, usages)