Skip to content

chore: Release

chore: Release #650

Triggered via push October 23, 2023 13:08
Status Success
Total duration 2m 23s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention
Static code analysis
2m 10s
Static code analysis
Fit to window
Zoom out
Zoom in

Annotations

78 warnings
`Box::new(_)` of default value: capi/src/graph.rs#L139
warning: `Box::new(_)` of default value --> capi/src/graph.rs:139:23 | 139 | Box::into_raw(Box::new(vec![])) | ^^^^^^^^^^^^^^^^ help: try: `Box::default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#box_default = note: `#[warn(clippy::box_default)]` on by default
creating a `Box` from a void raw pointer: capi/src/data.rs#L26
warning: creating a `Box` from a void raw pointer --> capi/src/data.rs:26:15 | 26 | let ptr = Box::from_raw(ptr); | ^^^^^^^^^^^^^^^^^^ | help: cast this to a pointer of the appropriate type --> capi/src/data.rs:26:29 | 26 | let ptr = Box::from_raw(ptr); | ^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_raw_with_void_ptr = note: `#[warn(clippy::from_raw_with_void_ptr)]` on by default
useless use of `format!`: cli/src/bin/bench_queries.rs#L109
warning: useless use of `format!` --> cli/src/bin/bench_queries.rs:109:16 | 109 | .help(&format!("Changes the default measurement time for this run. [default: 5]"))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Changes the default measurement time for this run. [default: 5]".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
this `impl` can be derived: graphannis/src/annis/types.rs#L226
warning: this `impl` can be derived --> graphannis/src/annis/types.rs:226:1 | 226 | / impl Default for VisualizerVisibility { 227 | | fn default() -> Self { 228 | | VisualizerVisibility::Hidden 229 | | } 230 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 215 + #[derive(Default)] 216 | pub enum VisualizerVisibility { | help: ...and mark the default variant | 217 ~ #[default] 218 ~ Hidden, |
this `impl` can be derived: graphannis/src/annis/types.rs#L142
warning: this `impl` can be derived --> graphannis/src/annis/types.rs:142:1 | 142 | / impl Default for TimelineStrategy { 143 | | fn default() -> Self { 144 | | TimelineStrategy::Explicit 145 | | } 146 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 123 + #[derive(Default)] 124 | pub enum TimelineStrategy { | help: ...and mark the default variant | 126 ~ #[default] 127 ~ Explicit, |
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: graphannis/src/annis/db/token_helper.rs#L50
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> graphannis/src/annis/db/token_helper.rs:50:9 | 50 | / db.get_all_components(Some(AnnotationComponentType::Coverage), None) 51 | | .into_iter(), | |________________________^ help: consider removing the `.into_iter()`: `db.get_all_components(Some(AnnotationComponentType::Coverage), None)` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/iter/traits/collect.rs:371:18 = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
returning the result of a `let` binding from a block: graphannis/src/annis/db/sort_matches.rs#L210
warning: returning the result of a `let` binding from a block --> graphannis/src/annis/db/sort_matches.rs:210:29 | 204 | / ... let v = gs_order.is_connected( 205 | | ... m1_lefttok, 206 | | ... m2_lefttok, 207 | | ... 1, 208 | | ... std::ops::Bound::Unbounded, 209 | | ... )?; | |_________________________- unnecessary `let` binding 210 | ... v | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 204 ~ 205 ~ gs_order.is_connected( 206 + m1_lefttok, 207 + m2_lefttok, 208 + 1, 209 + std::ops::Bound::Unbounded, 210 + )? |
using `clone` on type `Option<u64>` which implements the `Copy` trait: graphannis/src/annis/db/sort_matches.rs#L195
warning: using `clone` on type `Option<u64>` which implements the `Copy` trait --> graphannis/src/annis/db/sort_matches.rs:195:51 | 195 | cache.left_token.put(m2.node, result.clone()); | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `result` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `Option<u64>` which implements the `Copy` trait: graphannis/src/annis/db/sort_matches.rs#L192
warning: using `clone` on type `Option<u64>` which implements the `Copy` trait --> graphannis/src/annis/db/sort_matches.rs:192:21 | 192 | lefttok.clone() | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `lefttok` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `Option<u64>` which implements the `Copy` trait: graphannis/src/annis/db/sort_matches.rs#L187
warning: using `clone` on type `Option<u64>` which implements the `Copy` trait --> graphannis/src/annis/db/sort_matches.rs:187:51 | 187 | cache.left_token.put(m1.node, result.clone()); | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `result` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `Option<u64>` which implements the `Copy` trait: graphannis/src/annis/db/sort_matches.rs#L184
warning: using `clone` on type `Option<u64>` which implements the `Copy` trait --> graphannis/src/annis/db/sort_matches.rs:184:21 | 184 | lefttok.clone() | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `lefttok` | = 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
this function has too many arguments (8/7): graphannis/src/annis/db/sort_matches.rs#L133
warning: this function has too many arguments (8/7) --> graphannis/src/annis/db/sort_matches.rs:133:1 | 133 | / pub fn compare_match_by_text_pos( 134 | | m1: &Match, 135 | | m2: &Match, 136 | | node_annos: &dyn AnnotationStorage<NodeID>, ... | 141 | | cache: &mut SortCache, 142 | | ) -> Result<Ordering> { | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
this function has too many arguments (8/7): graphannis/src/annis/db/sort_matches.rs#L34
warning: this function has too many arguments (8/7) --> graphannis/src/annis/db/sort_matches.rs:34:1 | 34 | / pub fn compare_matchgroup_by_text_pos( 35 | | m1: &[Match], 36 | | m2: &[Match], 37 | | node_annos: &dyn AnnotationStorage<NodeID>, ... | 42 | | cache: &mut SortCache, 43 | | ) -> Result<Ordering> { | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
useless conversion to the same type: `std::string::String`: graphannis/src/annis/db/relannis.rs#L2152
warning: useless conversion to the same type: `std::string::String` --> graphannis/src/annis/db/relannis.rs:2152:30 | 2152 | target_node: parent_path.into(), | ^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `parent_path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
the following explicit lifetimes could be elided: 'a: graphannis/src/annis/db/relannis.rs#L856
warning: the following explicit lifetimes could be elided: 'a --> graphannis/src/annis/db/relannis.rs:856:23 | 856 | fn get_field_not_null<'a>( | ^^ 857 | record: &'a csv::StringRecord, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 856 ~ fn get_field_not_null( 857 ~ record: &csv::StringRecord, |
the following explicit lifetimes could be elided: 'a: graphannis/src/annis/db/relannis.rs#L791
warning: the following explicit lifetimes could be elided: 'a --> graphannis/src/annis/db/relannis.rs:791:14 | 791 | fn get_field<'a>( | ^^ 792 | record: &'a csv::StringRecord, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 791 ~ fn get_field( 792 ~ record: &csv::StringRecord, |
dereferencing a tuple pattern where every element takes a reference: graphannis/src/annis/db/exec/parallel/nestedloop.rs#L43
warning: dereferencing a tuple pattern where every element takes a reference --> graphannis/src/annis/db/exec/parallel/nestedloop.rs:43:42 | 43 | if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 43 - if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { 43 + if let (&Some(ref cost_lhs), Some(cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { |
dereferencing a tuple pattern where every element takes a reference: graphannis/src/annis/db/exec/parallel/nestedloop.rs#L43
warning: dereferencing a tuple pattern where every element takes a reference --> graphannis/src/annis/db/exec/parallel/nestedloop.rs:43:21 | 43 | if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 43 - if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { 43 + if let (Some(cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { |
this function has too many arguments (8/7): graphannis/src/annis/db/exec/nodesearch.rs#L799
warning: this function has too many arguments (8/7) --> graphannis/src/annis/db/exec/nodesearch.rs:799:5 | 799 | / fn new_tokensearch( 800 | | db: &'a AnnotationGraph, 801 | | val: ValueSearch<String>, 802 | | filters: Vec<MatchValueFilterFunc>, ... | 807 | | timeout: TimeoutCheck, 808 | | ) -> Result<NodeSearch<'a>> { | |_______________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
this function has too many arguments (8/7): graphannis/src/annis/db/exec/nodesearch.rs#L702
warning: this function has too many arguments (8/7) --> graphannis/src/annis/db/exec/nodesearch.rs:702:5 | 702 | / fn new_annosearch_regex( 703 | | db: &'a AnnotationGraph, 704 | | qname: (Option<String>, String), 705 | | pattern: &str, ... | 710 | | timeout: TimeoutCheck, 711 | | ) -> Result<NodeSearch<'a>> { | |_______________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
this function has too many arguments (8/7): graphannis/src/annis/db/exec/nodesearch.rs#L598
warning: this function has too many arguments (8/7) --> graphannis/src/annis/db/exec/nodesearch.rs:598:5 | 598 | / fn new_annosearch_exact( 599 | | db: &'a AnnotationGraph, 600 | | qname: (Option<String>, String), 601 | | val: ValueSearch<String>, ... | 606 | | timeout: TimeoutCheck, 607 | | ) -> Result<NodeSearch<'a>> { | |_______________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
dereferencing a tuple pattern where every element takes a reference: graphannis/src/annis/db/exec/nestedloop.rs#L35
warning: dereferencing a tuple pattern where every element takes a reference --> graphannis/src/annis/db/exec/nestedloop.rs:35:42 | 35 | if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 35 - if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { 35 + if let (&Some(ref cost_lhs), Some(cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { |
dereferencing a tuple pattern where every element takes a reference: graphannis/src/annis/db/exec/nestedloop.rs#L35
warning: dereferencing a tuple pattern where every element takes a reference --> graphannis/src/annis/db/exec/nestedloop.rs:35:21 | 35 | if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 35 - if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { 35 + if let (Some(cost_lhs), &Some(ref cost_rhs)) = (&desc_lhs.cost, &desc_rhs.cost) { |
the following explicit lifetimes could be elided: 'a: graphannis/src/annis/db/exec/mod.rs#L227
warning: the following explicit lifetimes could be elided: 'a --> graphannis/src/annis/db/exec/mod.rs:227:22 | 227 | fn as_nodesearch<'a>(&'a self) -> Option<&'a NodeSearch> { | ^^ ^^ ^^ ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 227 - fn as_nodesearch<'a>(&'a self) -> Option<&'a NodeSearch> { 227 + fn as_nodesearch(&self) -> Option<&NodeSearch> { |
the following explicit lifetimes could be elided: 'a: graphannis/src/annis/db/exec/mod.rs#L200
warning: the following explicit lifetimes could be elided: 'a --> graphannis/src/annis/db/exec/mod.rs:200:22 | 200 | fn as_nodesearch<'a>(&'a self) -> Option<&'a NodeSearch> { | ^^ ^^ ^^ ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 200 - fn as_nodesearch<'a>(&'a self) -> Option<&'a NodeSearch> { 200 + fn as_nodesearch(&self) -> Option<&NodeSearch> { |
dereferencing a tuple pattern where every element takes a reference: graphannis/src/annis/db/exec/mod.rs#L115
warning: dereferencing a tuple pattern where every element takes a reference --> graphannis/src/annis/db/exec/mod.rs:115:42 | 115 | if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&lhs.cost, &rhs.cost) { | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 115 - if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&lhs.cost, &rhs.cost) { 115 + if let (&Some(ref cost_lhs), Some(cost_rhs)) = (&lhs.cost, &rhs.cost) { |
dereferencing a tuple pattern where every element takes a reference: graphannis/src/annis/db/exec/mod.rs#L115
warning: dereferencing a tuple pattern where every element takes a reference --> graphannis/src/annis/db/exec/mod.rs:115:21 | 115 | if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&lhs.cost, &rhs.cost) { | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 115 - if let (&Some(ref cost_lhs), &Some(ref cost_rhs)) = (&lhs.cost, &rhs.cost) { 115 + if let (Some(cost_lhs), &Some(ref cost_rhs)) = (&lhs.cost, &rhs.cost) { |
the borrowed expression implements the required traits: graphannis/src/annis/db/corpusstorage.rs#L2647
warning: the borrowed expression implements the required traits --> graphannis/src/annis/db/corpusstorage.rs:2647:29 | 2647 | std::fs::create_dir_all(&db_dir).map_err(|e| CorpusStorageError::LockCorpusDirectory { | ^^^^^^^ help: change this to: `db_dir` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
dereferencing a tuple pattern where every element takes a reference: graphannis/src/annis/db/corpusstorage.rs#L2450
warning: dereferencing a tuple pattern where every element takes a reference --> graphannis/src/annis/db/corpusstorage.rs:2450:13 | 2450 | let &(ref lock, ref cvar) = &*self.active_background_workers; | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 2450 - let &(ref lock, ref cvar) = &*self.active_background_workers; 2450 + let (lock, cvar) = &*self.active_background_workers; |
this function has too many arguments (8/7): graphannis/src/annis/db/corpusstorage.rs#L1604
warning: this function has too many arguments (8/7) --> graphannis/src/annis/db/corpusstorage.rs:1604:5 | 1604 | / fn create_find_iterator_for_query<'b>( 1605 | | &'b self, 1606 | | db: &'b AnnotationGraph, 1607 | | query: &'b Disjunction, ... | 1612 | | timeout: TimeoutCheck, 1613 | | ) -> Result<(FindIterator<'b>, Option<usize>)> { | |__________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: graphannis/src/annis/db/corpusstorage.rs#L1407
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> graphannis/src/annis/db/corpusstorage.rs:1407:28 | 1407 | missing.extend(additional_components.into_iter()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `additional_components` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/iter/traits/collect.rs:371:18 = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
dereferencing a tuple pattern where every element takes a reference: graphannis/src/annis/db/corpusstorage.rs#L1369
warning: dereferencing a tuple pattern where every element takes a reference --> graphannis/src/annis/db/corpusstorage.rs:1369:17 | 1369 | let &(ref lock, ref cvar) = &*active_background_workers; | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 1369 - let &(ref lock, ref cvar) = &*active_background_workers; 1369 + let (lock, cvar) = &*active_background_workers; |
dereferencing a tuple pattern where every element takes a reference: graphannis/src/annis/db/corpusstorage.rs#L1354
warning: dereferencing a tuple pattern where every element takes a reference --> graphannis/src/annis/db/corpusstorage.rs:1354:17 | 1354 | let &(ref lock, ref _cvar) = &*active_background_workers; | ^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `#[warn(clippy::needless_borrowed_reference)]` on by default help: try removing the `&` and `ref` parts | 1354 - let &(ref lock, ref _cvar) = &*active_background_workers; 1354 + let (lock, _cvar) = &*active_background_workers; |
the borrowed expression implements the required traits: graphannis/src/annis/db/corpusstorage.rs#L1054
warning: the borrowed expression implements the required traits --> graphannis/src/annis/db/corpusstorage.rs:1054:67 | 1054 | let relative_path = new_path.strip_prefix(&new_base_path)?; | ^^^^^^^^^^^^^^ help: change this to: `new_base_path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this `impl` can be derived: graphannis/src/annis/db/corpusstorage.rs#L262
warning: this `impl` can be derived --> graphannis/src/annis/db/corpusstorage.rs:262:1 | 262 | / impl Default for QueryLanguage { 263 | | fn default() -> Self { 264 | | QueryLanguage::AQL 265 | | } 266 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 256 + #[derive(Default)] 257 | pub enum QueryLanguage { | help: ...and mark the default variant | 257 ~ #[default] 258 ~ AQL, |
this `impl` can be derived: graphannis/src/annis/db/corpusstorage.rs#L209
warning: this `impl` can be derived --> graphannis/src/annis/db/corpusstorage.rs:209:1 | 209 | / impl Default for ResultOrder { 210 | | fn default() -> Self { 211 | | ResultOrder::Normal 212 | | } 213 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` on by default = help: remove the manual implementation... help: ...and instead derive it... | 197 + #[derive(Default)] 198 | pub enum ResultOrder { | help: ...and mark the default variant | 199 ~ #[default] 200 ~ Normal, |
this expression creates a reference which is immediately dereferenced by the compiler: graphannis/src/annis/db/corpusstorage/subgraph.rs#L474
warning: this expression creates a reference which is immediately dereferenced by the compiler --> graphannis/src/annis/db/corpusstorage/subgraph.rs:474:41 | 474 | let token_helper = TokenHelper::new(&orig_graph).ok(); | ^^^^^^^^^^^ help: change this to: `orig_graph` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
redundant closure: graphannis/src/annis/db/corpusstorage/subgraph.rs#L435
warning: redundant closure --> graphannis/src/annis/db/corpusstorage/subgraph.rs:435:14 | 435 | .map(|n| Ok(n)) | ^^^^^^^^^ help: replace the closure with the function itself: `Ok` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
redundant closure: graphannis/src/annis/db/corpusstorage/subgraph.rs#L406
warning: redundant closure --> graphannis/src/annis/db/corpusstorage/subgraph.rs:406:41 | 406 | Ok(Box::new(parents.into_iter().map(|p| Ok(p)))) | ^^^^^^^^^ help: replace the closure with the function itself: `Ok` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
use of `flat_map` with an identity function: graphannis/src/annis/db/corpusstorage/subgraph.rs#L381
warning: use of `flat_map` with an identity function --> graphannis/src/annis/db/corpusstorage/subgraph.rs:381:40 | 381 | let result = iterators.into_iter().flat_map(|it| it); | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#flat_map_identity = note: `#[warn(clippy::flat_map_identity)]` on by default
deref which would be done by auto-deref: graphannis/src/annis/db/aql/operators/edge_op.rs#L181
warning: deref which would be done by auto-deref --> graphannis/src/annis/db/aql/operators/edge_op.rs:181:36 | 181 | if re.is_match(&*a.val) { | ^^^^^^^ help: try: `&a.val` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: graphannis/src/annis/db/aql/operators/edge_op.rs#L154
warning: deref which would be done by auto-deref --> graphannis/src/annis/db/aql/operators/edge_op.rs:154:37 | 154 | if !re.is_match(&*a.val) { | ^^^^^^^ help: try: `&a.val` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` on by default
parameter is only used in recursion: graphannis/src/annis/db/aql/model.rs#L239
warning: parameter is only used in recursion --> graphannis/src/annis/db/aql/model.rs:239:10 | 239 | &self, | ^^^^ | note: parameter used here --> graphannis/src/annis/db/aql/model.rs:272:49 | 272 | indirectly_covered_token.extend(self.calculate_inherited_coverage_edges( | ^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion = note: `#[warn(clippy::only_used_in_recursion)]` on by default
iterating on a map's values: graphannis/src/annis/db/aql/conjunction.rs#L842
warning: iterating on a map's values --> graphannis/src/annis/db/aql/conjunction.rs:842:9 | 842 | / component2exec 843 | | .into_iter() 844 | | .map(|(_cid, exec)| exec) | |_____________________________________^ help: try: `component2exec.into_values()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map = note: `#[warn(clippy::iter_kv_map)]` on by default
this function has too many arguments (8/7): graphannis/src/annis/db/aql/conjunction.rs#L595
warning: this function has too many arguments (8/7) --> graphannis/src/annis/db/aql/conjunction.rs:595:5 | 595 | / fn add_node_to_exec_plan<'a>( 596 | | &'a self, 597 | | node_nr: usize, 598 | | g: &'a AnnotationGraph, ... | 606 | | timeout: TimeoutCheck, 607 | | ) -> Result<()> { | |___________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
the following explicit lifetimes could be elided: 'b: graphannis/src/annis/util/sortablecontainer.rs#L69
warning: the following explicit lifetimes could be elided: 'b --> graphannis/src/annis/util/sortablecontainer.rs:69:16 | 69 | fn try_get<'b>(&'b self, index: usize) -> Result<Cow<'b, T>> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 69 - fn try_get<'b>(&'b self, index: usize) -> Result<Cow<'b, T>> { 69 + fn try_get(&self, index: usize) -> Result<Cow<'_, T>> { |
the following explicit lifetimes could be elided: 'b: graphannis/src/annis/util/sortablecontainer.rs#L40
warning: the following explicit lifetimes could be elided: 'b --> graphannis/src/annis/util/sortablecontainer.rs:40:16 | 40 | fn try_get<'b>(&'b self, index: usize) -> Result<Cow<'b, T>> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 40 - fn try_get<'b>(&'b self, index: usize) -> Result<Cow<'b, T>> { 40 + fn try_get(&self, index: usize) -> Result<Cow<'_, T>> { |
the following explicit lifetimes could be elided: 'b: graphannis/src/annis/util/sortablecontainer.rs#L14
warning: the following explicit lifetimes could be elided: 'b --> graphannis/src/annis/util/sortablecontainer.rs:14:16 | 14 | fn try_get<'b>(&'b self, index: usize) -> Result<Cow<'b, T>>; | ^^ ^^ ^^ | = 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 | 14 - fn try_get<'b>(&'b self, index: usize) -> Result<Cow<'b, T>>; 14 + fn try_get(&self, index: usize) -> Result<Cow<'_, T>>; |
this `else` branch is empty: graphannis/src/annis/db/corpusstorage.rs#L1282
warning: this `else` branch is empty --> graphannis/src/annis/db/corpusstorage.rs:1282:23 | 1282 | } else { | _______________________^ 1283 | | }; | |_____________________^ help: you can remove it | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else = note: `#[warn(clippy::needless_else)]` on by default
the borrowed expression implements the required traits: core/src/util/disk_collections.rs#L362
warning: the borrowed expression implements the required traits --> core/src/util/disk_collections.rs:362:19 | 362 | .open(&location)?; | ^^^^^^^^^ help: change this to: `location` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
use of `default` to create a unit struct: core/src/types.rs#L240
warning: use of `default` to create a unit struct --> core/src/types.rs:240:60 | 240 | phantom: std::marker::PhantomData::<CT>::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
use of `default` to create a unit struct: core/src/types.rs#L207
warning: use of `default` to create a unit struct --> core/src/types.rs:207:52 | 207 | phantom: std::marker::PhantomData::<CT>::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
deref which would be done by auto-deref: core/src/graph/mod.rs#L1063
warning: deref which would be done by auto-deref --> core/src/graph/mod.rs:1063:47 | 1063 | let cached_size: &mut Option<usize> = &mut *lock; | ^^^^^^^^^^ help: try: `&mut lock` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: core/src/graph/mod.rs#L1052
warning: deref which would be done by auto-deref --> core/src/graph/mod.rs:1052:47 | 1052 | let cached_size: &mut Option<usize> = &mut *lock; | ^^^^^^^^^^ help: try: `&mut lock` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` on by default
the borrowed expression implements the required traits: core/src/graph/storage/mod.rs#L169
warning: the borrowed expression implements the required traits --> core/src/graph/storage/mod.rs:169:40 | 169 | let f_data = std::fs::File::create(&data_path)?; | ^^^^^^^^^^ help: change this to: `data_path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the borrowed expression implements the required traits: core/src/graph/storage/disk_adjacency.rs#L187
warning: the borrowed expression implements the required traits --> core/src/graph/storage/disk_adjacency.rs:187:45 | 187 | let f_stats = std::fs::File::create(&stats_path)?; | ^^^^^^^^^^^ help: change this to: `stats_path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the borrowed expression implements the required traits: core/src/graph/storage/disk_adjacency.rs#L151
warning: the borrowed expression implements the required traits --> core/src/graph/storage/disk_adjacency.rs:151:43 | 151 | let f_stats = std::fs::File::open(&stats_path)?; | ^^^^^^^^^^^ help: change this to: `stats_path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
iterating on a map's values: core/src/graph/storage/disk_adjacency.rs#L40
warning: iterating on a map's values --> core/src/graph/storage/disk_adjacency.rs:40:36 | 40 | let mut fan_outs: Vec<usize> = fan_outs.into_iter().map(|(_, s)| s).collect(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fan_outs.into_values()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map = note: `#[warn(clippy::iter_kv_map)]` on by default
use of `or_insert_with` to construct default value: core/src/graph/storage/dense_adjacency.rs#L188
warning: use of `or_insert_with` to construct default value --> core/src/graph/storage/dense_adjacency.rs:188:30 | 188 | ... .or_insert_with(Vec::default); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
use of `or_insert_with` to construct default value: core/src/graph/storage/adjacencylist.rs#L262
warning: use of `or_insert_with` to construct default value --> core/src/graph/storage/adjacencylist.rs:262:63 | 262 | let regular_entry = self.edges.entry(edge.source).or_insert_with(Vec::default); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
use of `or_insert_with` to construct default value: core/src/graph/storage/adjacencylist.rs#L256
warning: use of `or_insert_with` to construct default value --> core/src/graph/storage/adjacencylist.rs:256:18 | 256 | .or_insert_with(Vec::default); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
use of `or_insert_with` to construct default value: core/src/annostorage/ondisk.rs#L920
warning: use of `or_insert_with` to construct default value --> core/src/annostorage/ondisk.rs:920:18 | 920 | .or_insert_with(std::vec::Vec::new); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
this expression creates a reference which is immediately dereferenced by the compiler: core/src/annostorage/ondisk.rs#L789
warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/annostorage/ondisk.rs:789:54 | 789 | let val_prefix = std::str::from_utf8(&val_prefix); | ^^^^^^^^^^^ help: change this to: `val_prefix` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
needlessly taken reference of both operands: core/src/annostorage/ondisk.rs#L616
warning: needlessly taken reference of both operands --> core/src/annostorage/ondisk.rs:616:32 | 616 | ... if &item_value != &value { | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref help: use the values directly | 616 | if item_value != value { | ~~~~~~~~~~ ~~~~~
this lifetime isn't used in the impl: core/src/annostorage/ondisk.rs#L302
warning: this lifetime isn't used in the impl --> core/src/annostorage/ondisk.rs:302:6 | 302 | impl<'de, T> AnnotationStorage<T> for AnnoStorageImpl<T> | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
use of `or_insert_with` to construct default value: core/src/annostorage/inmemory.rs#L897
warning: use of `or_insert_with` to construct default value --> core/src/annostorage/inmemory.rs:897:26 | 897 | .or_insert_with(std::vec::Vec::new); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
this expression creates a reference which is immediately dereferenced by the compiler: core/src/annostorage/inmemory.rs#L758
warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/annostorage/inmemory.rs:758:54 | 758 | let val_prefix = std::str::from_utf8(&val_prefix); | ^^^^^^^^^^^ help: change this to: `val_prefix` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
needlessly taken reference of both operands: core/src/annostorage/inmemory.rs#L582
warning: needlessly taken reference of both operands --> core/src/annostorage/inmemory.rs:582:32 | 582 | ... if &item_value != &value { | ^^^^^^^^^^^^^^^^^^^^^ | = 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 | 582 | if item_value != value { | ~~~~~~~~~~ ~~~~~
use of `or_insert_with` to construct default value: core/src/annostorage/inmemory.rs#L263
warning: use of `or_insert_with` to construct default value --> core/src/annostorage/inmemory.rs:263:14 | 263 | .or_insert_with(FxHashMap::default) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
use of `or_insert_with` to construct default value: core/src/annostorage/inmemory.rs#L265
warning: use of `or_insert_with` to construct default value --> core/src/annostorage/inmemory.rs:265:14 | 265 | .or_insert_with(Vec::default) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
use of `or_insert_with` to construct default value: core/src/annostorage/inmemory.rs#L231
warning: use of `or_insert_with` to construct default value --> core/src/annostorage/inmemory.rs:231:18 | 231 | .or_insert_with(Vec::new); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default = note: `#[warn(clippy::unwrap_or_default)]` on by default
this lifetime isn't used in the impl: core/src/annostorage/inmemory.rs#L133
warning: this lifetime isn't used in the impl --> core/src/annostorage/inmemory.rs:133:6 | 133 | impl<'de_impl, T> AnnoStorageImpl<T> | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
this lifetime isn't used in the impl: core/src/annostorage/inmemory.rs#L45
warning: this lifetime isn't used in the impl --> core/src/annostorage/inmemory.rs:45:9 | 45 | 'de_impl, | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
Static code analysis
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/[email protected], actions-rs/[email protected], actions-rs/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Static code analysis
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Static code analysis
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Static code analysis
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Static code analysis
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/