Files #23
Files #23
clippy
14 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 14 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.74.1 (a28077b28 2023-12-04)
- cargo 1.74.1 (ecb9851af 2023-10-18)
- clippy 0.1.74 (a28077b 2023-12-04)
Annotations
Check warning on line 67 in ls_framework/src/language_server.rs
github-actions / clippy
unused `std::result::Result` that must be used
warning: unused `std::result::Result` that must be used
--> ls_framework/src/language_server.rs:64:9
|
64 | / self.workspace
65 | | .write()
66 | | .unwrap()
67 | | .read_local_files(workspace_url);
| |____________________________________________^
|
= note: this `Result` may be an `Err` variant, which should be handled
= note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
|
64 | let _ = self.workspace
| +++++++
Check warning on line 62 in ls_framework/src/workspace.rs
github-actions / clippy
unnecessary `if let` since only the `Ok` variant of the iterator element is used
warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used
--> ls_framework/src/workspace.rs:50:9
|
50 | for entry in walker {
| ^ ------ help: try: `walker.flatten()`
| _________|
| |
51 | | if let Ok(entry) = entry {
52 | | let path = entry.path();
53 | | info!("{:?}", path);
... |
61 | | }
62 | | }
| |_________^
|
help: ...and remove the `if let` statement in the for loop
--> ls_framework/src/workspace.rs:51:13
|
51 | / if let Ok(entry) = entry {
52 | | let path = entry.path();
53 | | info!("{:?}", path);
54 | |
... |
60 | | }
61 | | }
| |_____________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
= note: `#[warn(clippy::manual_flatten)]` on by default
Check warning on line 36 in ls_framework/src/workspace.rs
github-actions / clippy
writing `&String` instead of `&str` involves a new object where a slice will do
warning: writing `&String` instead of `&str` involves a new object where a slice will do
--> ls_framework/src/workspace.rs:36:56
|
36 | pub fn read_local_files(&mut self, workspace_addr: &String) -> Result<(), std::io::Error> {
| ^^^^^^^ help: change this to: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
Check warning on line 411 in ls_framework/src/metadata/symbol_table.rs
github-actions / clippy
needlessly taken reference of both operands
warning: needlessly taken reference of both operands
--> ls_framework/src/metadata/symbol_table.rs:411:35
|
411 | .position(|s| &s.name == &symbol_name)
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
help: use the values directly
|
411 | .position(|s| s.name == symbol_name)
| ~~~~~~ ~~~~~~~~~~~
Check warning on line 101 in ls_framework/src/file_graph.rs
github-actions / clippy
using `clone` on type `Option<&Node>` which implements the `Copy` trait
warning: using `clone` on type `Option<&Node>` which implements the `Copy` trait
--> ls_framework/src/file_graph.rs:101:9
|
101 | self.graph.node_weight(node_index).clone()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.graph.node_weight(node_index)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
Check warning on line 66 in ls_framework/src/workspace.rs
github-actions / clippy
method `read_external_files` is never used
warning: method `read_external_files` is never used
--> ls_framework/src/workspace.rs:66:12
|
24 | impl Workspace {
| -------------- method in this implementation
...
66 | pub fn read_external_files(&mut self) -> Result<(), std::io::Error> {
| ^^^^^^^^^^^^^^^^^^^
Check warning on line 34 in ls_framework/src/lsp_mappings.rs
github-actions / clippy
method `get` is never used
warning: method `get` is never used
--> ls_framework/src/lsp_mappings.rs:34:12
|
33 | impl SymbolCompletionType {
| ------------------------- method in this implementation
34 | pub fn get(&self) -> CompletionItemKind {
| ^^^
Check warning on line 94 in ls_framework/src/file_graph.rs
github-actions / clippy
method `add_edge` is never used
warning: method `add_edge` is never used
--> ls_framework/src/file_graph.rs:94:12
|
46 | impl FileGraph {
| -------------- method in this implementation
...
94 | pub fn add_edge(&mut self, source_file_id: &NodeIndex, target_file_id: &NodeIndex) {
| ^^^^^^^^
Check warning on line 12 in ls_framework/src/file_graph.rs
github-actions / clippy
variant `External` is never constructed
warning: variant `External` is never constructed
--> ls_framework/src/file_graph.rs:12:5
|
10 | pub enum Location {
| -------- variant in this enum
11 | Local,
12 | External,
| ^^^^^^^^
|
= note: `Location` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
Check warning on line 103 in ls_framework/src/file.rs
github-actions / clippy
methods `get_quick_diagnostics` and `get_full_diagnostics` are never used
warning: methods `get_quick_diagnostics` and `get_full_diagnostics` are never used
--> ls_framework/src/file.rs:103:12
|
24 | impl File {
| --------- methods in this implementation
...
103 | pub fn get_quick_diagnostics(&self) -> Vec<Diagnostic> {
| ^^^^^^^^^^^^^^^^^^^^^
...
107 | pub fn get_full_diagnostics(&self) -> Vec<Diagnostic> {
| ^^^^^^^^^^^^^^^^^^^^
Check warning on line 36 in ls_framework/src/features/diagnostics/provider.rs
github-actions / clippy
function `get_full_diagnostics` is never used
warning: function `get_full_diagnostics` is never used
--> ls_framework/src/features/diagnostics/provider.rs:36:8
|
36 | pub fn get_full_diagnostics(
| ^^^^^^^^^^^^^^^^^^^^
Check warning on line 29 in ls_framework/src/features/diagnostics/provider.rs
github-actions / clippy
function `get_quick_diagnostics` is never used
warning: function `get_quick_diagnostics` is never used
--> ls_framework/src/features/diagnostics/provider.rs:29:8
|
29 | pub fn get_quick_diagnostics(
| ^^^^^^^^^^^^^^^^^^^^^
Check warning on line 25 in ls_framework/src/features/completion.rs
github-actions / clippy
function `get_symbol_completion_type` is never used
warning: function `get_symbol_completion_type` is never used
--> ls_framework/src/features/completion.rs:25:4
|
25 | fn get_symbol_completion_type(symbol_kind: String) -> Option<CompletionItemKind> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 8 in ls_framework/src/features/completion.rs
github-actions / clippy
function `default_list` is never used
warning: function `default_list` is never used
--> ls_framework/src/features/completion.rs:8:4
|
8 | fn default_list(
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default