Updating dependicies #405
Annotations
12 errors and 18 warnings
used `unwrap()` on a `Result` value:
function-grep/src/supported_languages.rs#L167
error: used `unwrap()` on a `Result` value
--> function-grep/src/supported_languages.rs:167:24
|
167 | let tags = tag_config
| ________________________^
168 | | .generate_tags(&mut tag_context, code, None)
169 | | .unwrap()
| |_________________________^
|
= note: if this value is an `Err`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
|
used `unwrap()` on a `Result` value:
function-grep/src/supported_languages.rs#L161
error: used `unwrap()` on a `Result` value
--> function-grep/src/supported_languages.rs:161:13
|
161 | TagsConfiguration::new(self.language(), &self.tag_query().to_string(), "").unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is an `Err`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
|
used `unwrap()` on a `Result` value:
function-grep/src/supported_languages.rs#L122
error: used `unwrap()` on a `Result` value
--> function-grep/src/supported_languages.rs:122:21
|
122 | let query = Query::new(
| _____________________^
123 | | &self.language(),
124 | | &self.query_string_function(search.as_ref()),
125 | | )
126 | | .unwrap();
| |_________________^
|
= note: if this value is an `Err`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
|
used `unwrap()` on a `Result` value:
function-grep/src/supported_languages.rs#L112
error: used `unwrap()` on a `Result` value
--> function-grep/src/supported_languages.rs:112:61
|
112 | .any(|c| c.index == method_field && c.node.utf8_text(code).unwrap() == name)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is an `Err`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
|
used `unwrap()` on an `Option` value:
function-grep/src/supported_languages.rs#L101
error: used `unwrap()` on an `Option` value
--> function-grep/src/supported_languages.rs:101:28
|
101 | let method_field = query
| ____________________________^
102 | | .capture_index_for_name(&self.query_name().to_string())
103 | | .unwrap();
| |_____________________^
|
= note: if this value is `None`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
|
used `unwrap()` on a `Result` value:
function-grep/src/supported_languages.rs#L100
error: used `unwrap()` on a `Result` value
--> function-grep/src/supported_languages.rs:100:21
|
100 | let query = Query::new(&self.language(), &self.query_string().to_string()).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is an `Err`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
note: the lint level is defined here
--> function-grep/src/lib.rs:2:9
|
2 | #![deny(clippy::unwrap_used, clippy::expect_used)]
| ^^^^^^^^^^^^^^^^^^^
|
create-msrv-badge (git_function_history-proc-macro)
Process completed with exit code 1.
|
create-msrv-badge (function-grep)
Process completed with exit code 1.
|
create-msrv-badge (git-function-history-lib)
Process completed with exit code 1.
|
create-msrv-badge (cargo-function-history)
Process completed with exit code 1.
|
create-msrv-badge (function_history_backend_thread)
Process completed with exit code 1.
|
create-msrv-badge (git-function-history-gui)
Process completed with exit code 1.
|
this argument is a mutable reference, but not used mutably:
function-grep/src/filter.rs#L360
warning: this argument is a mutable reference, but not used mutably
--> function-grep/src/filter.rs:360:15
|
360 | hash_map: &mut HashMap<String, &'a dyn Filter<Supports = Language>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&HashMap<String, &'a dyn Filter<Supports = Language>>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
= note: `#[warn(clippy::needless_pass_by_ref_mut)]` implied by `#[warn(clippy::nursery)]`
|
first doc comment paragraph is too long:
function-grep/src/lib.rs#L80
warning: first doc comment paragraph is too long
--> function-grep/src/lib.rs:80:1
|
80 | / /// Tries to find the appropiate language for the given file [`file_name`] based on the list of
81 | | /// languages [`langs`] provided.
82 | | /// This works by obtaining the extension from the file path and using
83 | | /// [`get_file_type_from_file_ext`].
84 | | ///
85 | | /// # Errors
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
|
first doc comment paragraph is too long:
function-grep/src/supported_languages.rs#L257
warning: first doc comment paragraph is too long
--> function-grep/src/supported_languages.rs:257:1
|
257 | / /// Use to more easily make new [`SupportedLanguage`]s.
258 | | /// First provide the name (which is used as the type of the language), followed by the tree sitter
259 | | /// languge in parenthesis, next you put the file extensions in brackets with a leading .
260 | | /// to specify the query we use ?= variable -> string literal query.
261 | | /// In the query you when you want use the variable just do {variable}.
262 | | ///
263 | | /// Example:
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
= note: `#[warn(clippy::too_long_first_doc_paragraph)]` implied by `#[warn(clippy::nursery)]`
help: add an empty line
|
257 ~ /// Use to more easily make new [`SupportedLanguage`]s.
258 + ///
|
|
docs for function returning `Result` missing `# Errors` section:
function-grep/src/supported_languages.rs#L205
warning: docs for function returning `Result` missing `# Errors` section
--> function-grep/src/supported_languages.rs:205:5
|
205 | fn instantiate_map(self, name: &'a str) -> Result<Vec<InstantiatedLanguage<'a>>, QueryError>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
some fields in `TagsConfigurationThreadSafe` are not safe to be sent to another thread:
function-grep/src/supported_languages.rs#L137
warning: some fields in `TagsConfigurationThreadSafe` are not safe to be sent to another thread
--> function-grep/src/supported_languages.rs:137:1
|
137 | unsafe impl Send for TagsConfigurationThreadSafe {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: it is not safe to send field `0` to another thread
--> function-grep/src/supported_languages.rs:136:36
|
136 | struct TagsConfigurationThreadSafe(TagsConfiguration);
| ^^^^^^^^^^^^^^^^^
= help: use a thread-safe type that implements `Send`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_send_fields_in_send_ty
note: the lint level is defined here
--> function-grep/src/lib.rs:5:27
|
5 | #![warn(clippy::pedantic, clippy::nursery, clippy::cargo)]
| ^^^^^^^^^^^^^^^
= note: `#[warn(clippy::non_send_fields_in_send_ty)]` implied by `#[warn(clippy::nursery)]`
|
this argument is passed by value, but not consumed in the function body:
function-grep/src/filter.rs#L361
warning: this argument is passed by value, but not consumed in the function body
--> function-grep/src/filter.rs:361:13
|
361 | filter: FilterType<'a>,
| ^^^^^^^^^^^^^^ help: consider taking a reference instead: `&FilterType<'a>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: `#[warn(clippy::needless_pass_by_value)]` implied by `#[warn(clippy::pedantic)]`
|
docs for function returning `Result` missing `# Errors` section:
function-grep/src/filter.rs#L340
warning: docs for function returning `Result` missing `# Errors` section
--> function-grep/src/filter.rs:340:5
|
340 | pub fn add_filter(&mut self, filter: impl Into<FilterType<'a>>) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
method `default` can be confused for the standard trait method `std::default::Default::default`:
function-grep/src/filter.rs#L304
warning: method `default` can be confused for the standard trait method `std::default::Default::default`
--> function-grep/src/filter.rs:304:5
|
304 | / pub fn default() -> Self {
305 | | Self {
306 | | filters: HashMap::from([
307 | | (
... |
335 | | }
336 | | }
| |_____^
|
= help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
|
docs for function returning `Result` missing `# Errors` section:
function-grep/src/filter.rs#L253
warning: docs for function returning `Result` missing `# Errors` section
--> function-grep/src/filter.rs:253:5
|
253 | pub fn to_filter(&self, s: &str) -> Result<InstantiatedFilterType, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
the following explicit lifetimes could be elided: 'a:
function-grep/src/filter.rs#L252
warning: the following explicit lifetimes could be elided: 'a
--> function-grep/src/filter.rs:252:6
|
252 | impl<'a> FilterType<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
252 - impl<'a> FilterType<'a> {
252 + impl FilterType<'_> {
|
|
manual `Debug` impl does not include all fields:
function-grep/src/filter.rs#L153
warning: manual `Debug` impl does not include all fields
--> function-grep/src/filter.rs:153:1
|
153 | / impl<Supports: std::fmt::Debug> std::fmt::Debug for InstantiatedFilter<Supports> {
154 | | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
155 | | f.debug_struct("InstantiatedFilter")
156 | | .field("filter_information", &self.filter_information)
157 | | .finish()
158 | | }
159 | | }
| |_^
|
note: this field is unused
--> function-grep/src/filter.rs:134:5
|
134 | filter_function: FilterFunction,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: consider including all fields in this `Debug` impl
= help: consider calling `.finish_non_exhaustive()` if you intend to ignore fields
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_fields_in_debug
= note: `#[warn(clippy::missing_fields_in_debug)]` implied by `#[warn(clippy::pedantic)]`
|
re-implementing `PartialEq::ne` is unnecessary:
function-grep/src/filter.rs#L142
warning: re-implementing `PartialEq::ne` is unnecessary
--> function-grep/src/filter.rs:142:5
|
142 | / fn ne(&self, other: &Self) -> bool {
143 | | !self.eq(other)
144 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
= note: `#[warn(clippy::partialeq_ne_impl)]` on by default
|
docs for function returning `Result` missing `# Errors` section:
function-grep/src/filter.rs#L43
warning: docs for function returning `Result` missing `# Errors` section
--> function-grep/src/filter.rs:43:5
|
43 | fn to_filter(&self, s: &str) -> Result<InstantiatedFilter<Self::Supports>, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
|
docs for function returning `Result` missing `# Errors` section:
function-grep/src/filter.rs#L41
warning: docs for function returning `Result` missing `# Errors` section
--> function-grep/src/filter.rs:41:5
|
41 | fn parse_filter(&self, s: &str) -> Result<FilterFunction, String>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
note: the lint level is defined here
--> function-grep/src/lib.rs:5:9
|
5 | #![warn(clippy::pedantic, clippy::nursery, clippy::cargo)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::missing_errors_doc)]` implied by `#[warn(clippy::pedantic)]`
|
unused variable: `filter`:
function-grep/src/filter.rs#L361
warning: unused variable: `filter`
--> function-grep/src/filter.rs:361:5
|
361 | filter: FilterType<'a>,
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_filter`
|
unused variable: `hash_map`:
function-grep/src/filter.rs#L360
warning: unused variable: `hash_map`
--> function-grep/src/filter.rs:360:5
|
360 | hash_map: &mut HashMap<String, &'a dyn Filter<Supports = Language>>,
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_hash_map`
|
unused variable: `s`:
function-grep/src/filter/general_filters.rs#L137
warning: unused variable: `s`
--> function-grep/src/filter/general_filters.rs:137:28
|
137 | fn parse_filter(&self, s: &str) -> Result<FilterFunction, String> {
| ^ help: if this is intentional, prefix it with an underscore: `_s`
|
= note: `#[warn(unused_variables)]` on by default
|
unused macro definition: `default_filters`:
function-grep/src/filter.rs#L204
warning: unused macro definition: `default_filters`
--> function-grep/src/filter.rs:204:14
|
204 | macro_rules! default_filters {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_macros)]` on by default
|