Skip to content

Improved some error spans #1864

Improved some error spans

Improved some error spans #1864

Triggered via push October 21, 2023 08:33
Status Failure
Total duration 5m 49s
Artifacts

rust.yml

on: push
Matrix: Check
Matrix: Clippy
Matrix: Rustfmt
Fit to window
Zoom out
Zoom in

Annotations

22 errors and 127 warnings
Rustfmt (stable)
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
Rustfmt (1.65.0)
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
Test Suite: cgaal-engine/tests/parsing_expr.rs#L2
failed to resolve: could not find `ir` in `lcgs`
Test Suite: cgaal-engine/tests/parsing_expr.rs#L1
unresolved import `cgaal_engine::atl::convert`
Test Suite: cgaal-engine/tests/parsing_expr.rs#L3
unresolved import `cgaal_engine::game_structure::lcgs::parse`
Test Suite: cgaal-engine/tests/parsing_expr.rs#L87
this enum variant takes 1 argument but 2 arguments were supplied
Test Suite: cgaal-engine/tests/parsing_expr.rs#L100
this enum variant takes 1 argument but 2 arguments were supplied
Test Suite: cgaal-engine/tests/parsing_expr.rs#L149
this enum variant takes 1 argument but 2 arguments were supplied
Test Suite: cgaal-engine/tests/parsing_expr.rs#L154
this enum variant takes 1 argument but 2 arguments were supplied
Test Suite: cgaal-engine/tests/parsing_expr.rs#L187
this enum variant takes 1 argument but 2 arguments were supplied
Test Suite: cgaal-engine/tests/parsing_expr.rs#L228
this enum variant takes 1 argument but 2 arguments were supplied
Test Suite: cgaal-engine/tests/parsing_expr.rs#L266
this enum variant takes 1 argument but 2 arguments were supplied
Test Benches: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L301
failed to resolve: could not find `ir` in `lcgs`
Test Benches: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L302
failed to resolve: could not find `ir` in `lcgs`
Test Benches: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L303
failed to resolve: could not find `ir` in `lcgs`
Test Benches: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L300
unresolved import `crate::game_structure::lcgs::ast`
Test Benches: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L304
unresolved import `crate::game_structure::lcgs::parse`
Test Benches: cgaal-engine/src/game_structure/lcgs/relabeling.rs#L218
failed to resolve: could not find `ir` in `lcgs`
Test Benches: cgaal-engine/src/game_structure/lcgs/relabeling.rs#L215
unresolved import `crate::game_structure::lcgs::ast`
Test Benches: cgaal-engine/src/game_structure/lcgs/relabeling.rs#L219
unresolved import `crate::game_structure::lcgs::parse`
Test Benches: cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_constraints.rs#L220
cannot find function `parse_lcgs` in this scope
Test Benches: cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_constraints.rs#L237
cannot find function `parse_lcgs` in this scope
Rustfmt (stable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Rustfmt (stable)
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/
Rustfmt (stable)
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/
Rustfmt (stable)
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/
Rustfmt (stable)
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/
Rustfmt (1.65.0)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Rustfmt (1.65.0)
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/
Rustfmt (1.65.0)
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/
Rustfmt (1.65.0)
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/
Rustfmt (1.65.0)
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/
the function `convert_expr_to_phi` doesn't need a mutable reference: cgaal-cli/src/load.rs#L110
warning: the function `convert_expr_to_phi` doesn't need a mutable reference --> cgaal-cli/src/load.rs:110:66 | 110 | .and_then(|expr| convert_expr_to_phi(expr, game, &mut errors)) | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
the function `parse_atl` doesn't need a mutable reference: cgaal-cli/src/load.rs#L109
warning: the function `parse_atl` doesn't need a mutable reference --> cgaal-cli/src/load.rs:109:33 | 109 | parse_atl(&content, &mut errors) | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default
this returns a `Result<_, ()>`: cgaal-engine/src/parsing/mod.rs#L15
warning: this returns a `Result<_, ()>` --> cgaal-engine/src/parsing/mod.rs:15:1 | 15 | pub fn parse_atl(input: &str, errors: &ErrorLog) -> Result<Expr, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L327
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:327:80 | 327 | cases.push(RelabelCase::new(ident.span + expr.span, ident, expr.into())); | ^^^^^^^^^^^ help: consider removing `.into()`: `expr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L273
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:273:13 | 273 | update.into(), | ^^^^^^^^^^^^^ help: consider removing `.into()`: `update` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L271
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:271:13 | 271 | init.into(), | ^^^^^^^^^^^ help: consider removing `.into()`: `init` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L246
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:246:54 | 246 | Ok(RangeClause::new(start + end, min.into(), max.into())) | ^^^^^^^^^^ help: consider removing `.into()`: `max` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L246
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:246:42 | 246 | Ok(RangeClause::new(start + end, min.into(), max.into())) | ^^^^^^^^^^ help: consider removing `.into()`: `min` | = 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
this `impl` can be derived: cgaal-engine/src/game_structure/mod.rs#L43
warning: this `impl` can be derived --> cgaal-engine/src/game_structure/mod.rs:43:1 | 43 | / impl Default for StateIdx { 44 | | fn default() -> Self { 45 | | StateIdx(0) 46 | | } 47 | | } | |_^ | = 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 | 19 + #[derive(Default)] 20 | pub struct $name(pub $typ); |
this returns a `Result<_, ()>`: cgaal-engine/src/game_structure/lcgs/query.rs#L7
warning: this returns a `Result<_, ()>` --> cgaal-engine/src/game_structure/lcgs/query.rs:7:1 | 7 | pub fn convert_expr_to_phi(expr: Expr, game: &IntermediateLcgs, errors: &ErrorLog) -> Result<Phi, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
needlessly taken reference of left operand: cgaal-engine/src/game_structure/lcgs/symbol_table.rs#L103
warning: needlessly taken reference of left operand --> cgaal-engine/src/game_structure/lcgs/symbol_table.rs:103:32 | 103 | .find_map(|(i, s)| (&s.name == name).then_some(SymbIdx(i))) | ^-------^^^^^^^^^ | | | help: use the left value directly: `s.name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
needlessly taken reference of left operand: cgaal-engine/src/game_structure/lcgs/symbol_table.rs#L91
warning: needlessly taken reference of left operand --> cgaal-engine/src/game_structure/lcgs/symbol_table.rs:91:16 | 91 | if &symb.name == name { | ----------^^^^^^^^ | | | help: use the left value directly: `symb.name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
useless use of `format!`: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L524
warning: useless use of `format!` --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:524:21 | 524 | format!("Coalitions can only be used in ATL queries."), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Coalitions can only be used in ATL queries.".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L355
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:355:35 | 355 | return self.check(&con); | ^^^^ help: change this to: `con` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
unneeded `return` statement: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L375
warning: unneeded `return` statement --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:375:17 | 375 | return Ok(Expr::new(*span, ExprKind::Symbol(index))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 375 - return Ok(Expr::new(*span, ExprKind::Symbol(index))); 375 + Ok(Expr::new(*span, ExprKind::Symbol(index))) |
unneeded `return` statement: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L363
warning: unneeded `return` statement --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:363:13 | 363 | return Ok(Expr::new(*span, ExprKind::Symbol(index))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 363 - return Ok(Expr::new(*span, ExprKind::Symbol(index))); 363 + Ok(Expr::new(*span, ExprKind::Symbol(index))) |
useless use of `format!`: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L278
warning: useless use of `format!` --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:278:22 | 278 | msg: format!("Expression could not be reduced to a constant"), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Expression could not be reduced to a constant".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
all variants have the same postfix: `Expr`: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L215
warning: all variants have the same postfix: `Expr` --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:215:1 | 215 | / pub enum CheckMode { 216 | | /// In [ConstExpr] mode, identifiers in expressions can only refer to constants. 217 | | ConstExpr, 218 | | /// In [StateExpr] mode, identifiers in expressions can only refer to constants ... | 223 | | UpdateExpr, 224 | | } | |_^ | = help: remove the postfixes and use full paths to the variants instead of glob imports = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names = note: `#[warn(clippy::enum_variant_names)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L201
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:201:91 | 201 | SymbolChecker::new(symbols, &ident.owner, CheckMode::StateExpr).check(&cond)?; | ^^^^^ help: change this to: `cond` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
needlessly taken reference of both operands: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L190
warning: needlessly taken reference of both operands --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:190:20 | 190 | if &ident.name.text != &var.update_ident.text { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref help: use the values directly | 190 | if ident.name.text != var.update_ident.text { | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L170
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:170:91 | 170 | SymbolChecker::new(symbols, &ident.owner, CheckMode::StateExpr).check(&expr)?; | ^^^^^ help: change this to: `expr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
unneeded `return` statement: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L28
warning: unneeded `return` statement --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:28:5 | 28 | return Ok(out); | ^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 28 - return Ok(out); 28 + Ok(out) |
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/relabeling.rs#L184
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/relabeling.rs:184:37 | 184 | .map(|e| relabel_player(&self, e)) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
using `clone` on type `SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L258
warning: using `clone` on type `SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:258:37 | 258 | next_state.0.insert(symb_id.clone(), val); | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*symb_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L245
warning: using `clone` on type `SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:245:32 | 245 | state.0.insert(action.clone(), 0); | ^^^^^^^^^^^^^^ help: try dereferencing it: `*action` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L216
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:216:57 | 216 | let value = Evaluator::new(&state).eval(&cond); | ^^^^^ help: change this to: `cond` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
using `clone` on type `SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L157
warning: using `clone` on type `SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:157:30 | 157 | res.0.insert(symb_id.clone(), var.init_val); | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*symb_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L143
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:143:60 | 143 | return 0 != Evaluator::new(state).eval(&cond); | ^^^^^ help: change this to: `cond` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
using `clone` on type `SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L107
warning: using `clone` on type `SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:107:28 | 107 | let label_symbol = self.labels[label_index.0].clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.labels[label_index.0]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L95
warning: using `clone` on type `SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:95:32 | 95 | state.0.insert(symb_id.clone(), value); | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*symb_id` | = 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
needlessly taken reference of both operands: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L74
warning: needlessly taken reference of both operands --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:74:26 | 74 | .find(|decl| &decl.ident.to_string() == &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 | 74 | .find(|decl| decl.ident.to_string() == name) | ~~~~~~~~~~~~~~~~~~~~~~ ~~~~
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L64
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:64:35 | 64 | convert_expr_to_phi(expr, &self, errors) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this returns a `Result<_, ()>`: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L63
warning: this returns a `Result<_, ()>` --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:63:5 | 63 | pub fn create_phi(&self, expr: Expr, errors: &ErrorLog) -> Result<Phi, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L50
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:50:32 | 50 | } = symbol_check(root, &errors)?; | ^^^^^^^ help: change this to: `errors` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this returns a `Result<_, ()>`: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L44
warning: this returns a `Result<_, ()>` --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:44:5 | 44 | pub fn create(root: LcgsRoot, errors: &ErrorLog) -> Result<IntermediateLcgs, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err = note: `#[warn(clippy::result_unit_err)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_representative_search.rs#L40
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_representative_search.rs:40:47 | 40 | let decl = self.game.get_decl(&state_var).unwrap(); | ^^^^^^^^^^ help: change this to: `state_var` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_constrained_phi.rs#L96
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_constrained_phi.rs:96:73 | 96 | let mapped_expr = Self::map_expr_to_constraints(&expr, negated); | ^^^^^ help: change this to: `expr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/algorithms/certain_zero/search_strategy/instability_heuristic_search.rs#L224
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/algorithms/certain_zero/search_strategy/instability_heuristic_search.rs:224:63 | 224 | InstabilityHeuristicSearch::bidist_of_expr(state, &expr) | ^^^^^ help: change this to: `expr` | = 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 field names in struct initialization: cgaal-engine/src/parsing/ast.rs#L213
warning: redundant field names in struct initialization --> cgaal-engine/src/parsing/ast.rs:213:29 | 213 | OwnedIdent { owner, name: name } | ^^^^^^^^^^ help: replace it with: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names = note: `#[warn(clippy::redundant_field_names)]` on by default
Test Suite
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Test Suite
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/
Test Suite
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/
Test Suite
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/
Test Suite
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/
Clippy (stable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Clippy (stable)
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/
Clippy (stable)
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/
Clippy (stable)
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/
Clippy (stable)
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/
Check (stable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Check (stable)
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/
Check (stable)
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/
Check (stable)
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/
Check (stable)
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/
Test Benches
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Test Benches: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L305
unused import: `crate::game_structure::GameStructure`
Test Benches
`cgaal-engine` (lib test) generated 1 warning
Test Benches
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/
Test Benches
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/
Test Benches
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/
Test Benches
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/
Check (1.65.0)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Check (1.65.0)
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/
Check (1.65.0)
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/
Check (1.65.0)
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/
Check (1.65.0)
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/
the function `convert_expr_to_phi` doesn't need a mutable reference: cgaal-cli/src/load.rs#L110
warning: the function `convert_expr_to_phi` doesn't need a mutable reference --> cgaal-cli/src/load.rs:110:66 | 110 | .and_then(|expr| convert_expr_to_phi(expr, game, &mut errors)) | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
the function `parse_atl` doesn't need a mutable reference: cgaal-cli/src/load.rs#L109
warning: the function `parse_atl` doesn't need a mutable reference --> cgaal-cli/src/load.rs:109:33 | 109 | parse_atl(&content, &mut errors) | ^^^^^^^^^^^ | = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
use of `unwrap_or` followed by a function call: cgaal-engine/src/parsing/mod.rs#L24
warning: use of `unwrap_or` followed by a function call --> cgaal-engine/src/parsing/mod.rs:24:10 | 24 | .unwrap_or(Expr::new_error()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| Expr::new_error())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
this returns a `Result<_, ()>`: cgaal-engine/src/parsing/mod.rs#L15
warning: this returns a `Result<_, ()>` --> cgaal-engine/src/parsing/mod.rs:15:1 | 15 | pub fn parse_atl(input: &str, errors: &ErrorLog) -> Result<Expr, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L327
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:327:80 | 327 | cases.push(RelabelCase::new(ident.span + expr.span, ident, expr.into())); | ^^^^^^^^^^^ help: consider removing `.into()`: `expr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L273
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:273:13 | 273 | update.into(), | ^^^^^^^^^^^^^ help: consider removing `.into()`: `update` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L271
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:271:13 | 271 | init.into(), | ^^^^^^^^^^^ help: consider removing `.into()`: `init` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L246
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:246:54 | 246 | Ok(RangeClause::new(start + end, min.into(), max.into())) | ^^^^^^^^^^ help: consider removing `.into()`: `max` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `parsing::ast::Expr`: cgaal-engine/src/parsing/parser.rs#L246
warning: useless conversion to the same type: `parsing::ast::Expr` --> cgaal-engine/src/parsing/parser.rs:246:42 | 246 | Ok(RangeClause::new(start + end, min.into(), max.into())) | ^^^^^^^^^^ help: consider removing `.into()`: `min` | = note: `#[warn(clippy::useless_conversion)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
this `impl` can be derived: cgaal-engine/src/game_structure/mod.rs#L43
warning: this `impl` can be derived --> cgaal-engine/src/game_structure/mod.rs:43:1 | 43 | / impl Default for StateIdx { 44 | | fn default() -> Self { 45 | | StateIdx(0) 46 | | } 47 | | } | |_^ | = note: `#[warn(clippy::derivable_impls)]` on by default = help: try annotating `game_structure::StateIdx` with `#[derive(Default)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
this returns a `Result<_, ()>`: cgaal-engine/src/game_structure/lcgs/query.rs#L7
warning: this returns a `Result<_, ()>` --> cgaal-engine/src/game_structure/lcgs/query.rs:7:1 | 7 | pub fn convert_expr_to_phi(expr: Expr, game: &IntermediateLcgs, errors: &ErrorLog) -> Result<Phi, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
needlessly taken reference of left operand: cgaal-engine/src/game_structure/lcgs/symbol_table.rs#L103
warning: needlessly taken reference of left operand --> cgaal-engine/src/game_structure/lcgs/symbol_table.rs:103:32 | 103 | .find_map(|(i, s)| (&s.name == name).then_some(SymbIdx(i))) | ^-------^^^^^^^^^ | | | help: use the left value directly: `s.name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
needlessly taken reference of left operand: cgaal-engine/src/game_structure/lcgs/symbol_table.rs#L91
warning: needlessly taken reference of left operand --> cgaal-engine/src/game_structure/lcgs/symbol_table.rs:91:16 | 91 | if &symb.name == name { | ----------^^^^^^^^ | | | help: use the left value directly: `symb.name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
useless use of `format!`: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L524
warning: useless use of `format!` --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:524:21 | 524 | format!("Coalitions can only be used in ATL queries."), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Coalitions can only be used in ATL queries.".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
use of `ok_or` followed by a function call: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L508
warning: use of `ok_or` followed by a function call --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:508:18 | 508 | .ok_or(SpannedError::new( | __________________^ 509 | | id.span, 510 | | format!("Unknown player '{}'.", id.text), 511 | | ))?; | |__________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call help: try this | 508 ~ .ok_or_else(|| SpannedError::new( 509 + id.span, 510 + format!("Unknown player '{}'.", id.text), 511 ~ ))?; |
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L355
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:355:35 | 355 | return self.check(&con); | ^^^^ help: change this to: `con` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
use of `ok_or` followed by a function call: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L331
warning: use of `ok_or` followed by a function call --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:331:14 | 331 | .ok_or(SpannedError::new( | ______________^ 332 | | *span, 333 | | format!("Unknown declaration '{}'.", oi), 334 | | ))?; | |______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call help: try this | 331 ~ .ok_or_else(|| SpannedError::new( 332 + *span, 333 + format!("Unknown declaration '{}'.", oi), 334 ~ ))?; |
use of `ok_or` followed by a function call: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L317
warning: use of `ok_or` followed by a function call --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:317:18 | 317 | .ok_or(SpannedError::new( | __________________^ 318 | | player_name.span, 319 | | format!("Unknown player '{}'.", player_name.text), 320 | | ))?; | |__________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call help: try this | 317 ~ .ok_or_else(|| SpannedError::new( 318 + player_name.span, 319 + format!("Unknown player '{}'.", player_name.text), 320 ~ ))?; |
use of `or` followed by a function call: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L308
warning: use of `or` followed by a function call --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:308:30 | 308 | oi.owner.clone().or(self.scope_owner.clone()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| self.scope_owner.clone())` | = note: `#[warn(clippy::or_fun_call)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
unneeded `return` statement: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L375
warning: unneeded `return` statement --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:375:17 | 375 | return Ok(Expr::new(*span, ExprKind::Symbol(index))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `Ok(Expr::new(*span, ExprKind::Symbol(index)))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
unneeded `return` statement: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L363
warning: unneeded `return` statement --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:363:13 | 363 | return Ok(Expr::new(*span, ExprKind::Symbol(index))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `Ok(Expr::new(*span, ExprKind::Symbol(index)))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
useless use of `format!`: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L278
warning: useless use of `format!` --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:278:22 | 278 | msg: format!("Expression could not be reduced to a constant"), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Expression could not be reduced to a constant".to_string()` | = note: `#[warn(clippy::useless_format)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
all variants have the same postfix: `Expr`: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L215
warning: all variants have the same postfix: `Expr` --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:215:1 | 215 | / pub enum CheckMode { 216 | | /// In [ConstExpr] mode, identifiers in expressions can only refer to constants. 217 | | ConstExpr, 218 | | /// In [StateExpr] mode, identifiers in expressions can only refer to constants ... | 223 | | UpdateExpr, 224 | | } | |_^ | = note: `#[warn(clippy::enum_variant_names)]` on by default = help: remove the postfixes and use full paths to the variants instead of glob imports = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L201
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:201:91 | 201 | SymbolChecker::new(symbols, &ident.owner, CheckMode::StateExpr).check(&cond)?; | ^^^^^ help: change this to: `cond` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
needlessly taken reference of both operands: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L190
warning: needlessly taken reference of both operands --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:190:20 | 190 | if &ident.name.text != &var.update_ident.text { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref help: use the values directly | 190 | if ident.name.text != var.update_ident.text { | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L170
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:170:91 | 170 | SymbolChecker::new(symbols, &ident.owner, CheckMode::StateExpr).check(&expr)?; | ^^^^^ help: change this to: `expr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
unneeded `return` statement: cgaal-engine/src/game_structure/lcgs/symbol_checker.rs#L28
warning: unneeded `return` statement --> cgaal-engine/src/game_structure/lcgs/symbol_checker.rs:28:5 | 28 | return Ok(out); | ^^^^^^^^^^^^^^^ help: remove `return`: `Ok(out)` | = note: `#[warn(clippy::needless_return)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/relabeling.rs#L184
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/relabeling.rs:184:37 | 184 | .map(|e| relabel_player(&self, e)) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L258
warning: using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:258:37 | 258 | next_state.0.insert(symb_id.clone(), val); | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*symb_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L245
warning: using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:245:32 | 245 | state.0.insert(action.clone(), 0); | ^^^^^^^^^^^^^^ help: try dereferencing it: `*action` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L216
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:216:57 | 216 | let value = Evaluator::new(&state).eval(&cond); | ^^^^^ help: change this to: `cond` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L157
warning: using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:157:30 | 157 | res.0.insert(symb_id.clone(), var.init_val); | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*symb_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L143
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:143:60 | 143 | return 0 != Evaluator::new(state).eval(&cond); | ^^^^^ help: change this to: `cond` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L107
warning: using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:107:28 | 107 | let label_symbol = self.labels[label_index.0].clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.labels[label_index.0]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L95
warning: using `clone` on type `game_structure::lcgs::symbol_table::SymbIdx` which implements the `Copy` trait --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:95:32 | 95 | state.0.insert(symb_id.clone(), value); | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*symb_id` | = note: `#[warn(clippy::clone_on_copy)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
needlessly taken reference of both operands: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L74
warning: needlessly taken reference of both operands --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:74:26 | 74 | .find(|decl| &decl.ident.to_string() == &name) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(clippy::op_ref)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref help: use the values directly | 74 | .find(|decl| decl.ident.to_string() == name) | ~~~~~~~~~~~~~~~~~~~~~~ ~~~~
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L64
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:64:35 | 64 | convert_expr_to_phi(expr, &self, errors) | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this returns a `Result<_, ()>`: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L63
warning: this returns a `Result<_, ()>` --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:63:5 | 63 | pub fn create_phi(&self, expr: Expr, errors: &ErrorLog) -> Result<Phi, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L50
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:50:32 | 50 | } = symbol_check(root, &errors)?; | ^^^^^^^ help: change this to: `errors` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this returns a `Result<_, ()>`: cgaal-engine/src/game_structure/lcgs/intermediate.rs#L44
warning: this returns a `Result<_, ()>` --> cgaal-engine/src/game_structure/lcgs/intermediate.rs:44:5 | 44 | pub fn create(root: LcgsRoot, errors: &ErrorLog) -> Result<IntermediateLcgs, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(clippy::result_unit_err)]` on by default = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_representative_search.rs#L124
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_representative_search.rs:124:58 | 124 | dist += (state.0[&state_var] - rep.0[&state_var]).unsigned_abs(); | ^^^^^^^^^^ help: change this to: `state_var` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_representative_search.rs#L124
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_representative_search.rs:124:38 | 124 | dist += (state.0[&state_var] - rep.0[&state_var]).unsigned_abs(); | ^^^^^^^^^^ help: change this to: `state_var` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_representative_search.rs#L40
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_representative_search.rs:40:47 | 40 | let decl = self.game.get_decl(&state_var).unwrap(); | ^^^^^^^^^^ help: change this to: `state_var` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_constrained_phi.rs#L96
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/algorithms/certain_zero/search_strategy/linear_constrained_phi.rs:96:73 | 96 | let mapped_expr = Self::map_expr_to_constraints(&expr, negated); | ^^^^^ help: change this to: `expr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: cgaal-engine/src/algorithms/certain_zero/search_strategy/instability_heuristic_search.rs#L224
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cgaal-engine/src/algorithms/certain_zero/search_strategy/instability_heuristic_search.rs:224:63 | 224 | InstabilityHeuristicSearch::bidist_of_expr(state, &expr) | ^^^^^ help: change this to: `expr` | = note: `#[warn(clippy::needless_borrow)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
redundant field names in struct initialization: cgaal-engine/src/parsing/ast.rs#L213
warning: redundant field names in struct initialization --> cgaal-engine/src/parsing/ast.rs:213:29 | 213 | OwnedIdent { owner, name: name } | ^^^^^^^^^^ help: replace it with: `name` | = note: `#[warn(clippy::redundant_field_names)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
Clippy (1.65.0)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Clippy (1.65.0)
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/
Clippy (1.65.0)
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/
Clippy (1.65.0)
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/
Clippy (1.65.0)
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/