fixed imports and exceptions #98
check_format.yaml
on: push
cargo fmt
41s
Clippy lint and check
1m 8s
Annotations
11 errors and 8 warnings
cargo fmt
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
|
cannot find function `clock_reduce` in module `clock_reduction`:
src/tests/clock_reduction/advanced_clock_removal_test.rs#L22
error[E0425]: cannot find function `clock_reduce` in module `clock_reduction`
--> src/tests/clock_reduction/advanced_clock_removal_test.rs:22:26
|
22 | clock_reduction::clock_reduce(&mut system_recipe_copy, None, &mut dimensions, None)
| ^^^^^^^^^^^^ not found in `clock_reduction`
|
help: consider importing this function
|
6 + use crate::transition_systems::clock_reduction::reduction::clock_reduce;
|
help: if you import `clock_reduce`, refer to it directly
|
22 - clock_reduction::clock_reduce(&mut system_recipe_copy, None, &mut dimensions, None)
22 + clock_reduce(&mut system_recipe_copy, None, &mut dimensions, None)
|
|
cannot find function `clock_reduce` in module `clock_reduction`:
src/tests/clock_reduction/clock_removal_test.rs#L95
error[E0425]: cannot find function `clock_reduce` in module `clock_reduction`
--> src/tests/clock_reduction/clock_removal_test.rs:95:26
|
95 | clock_reduction::clock_reduce(&mut Box::from(recipe), None, &mut dim, None).unwrap();
| ^^^^^^^^^^^^ not found in `clock_reduction`
|
help: consider importing this function
|
3 + use crate::transition_systems::clock_reduction::reduction::clock_reduce;
|
help: if you import `clock_reduce`, refer to it directly
|
95 - clock_reduction::clock_reduce(&mut Box::from(recipe), None, &mut dim, None).unwrap();
95 + clock_reduce(&mut Box::from(recipe), None, &mut dim, None).unwrap();
|
|
cannot find function `clock_reduce` in module `clock_reduction`:
src/tests/clock_reduction/clock_removal_test.rs#L124
error[E0425]: cannot find function `clock_reduce` in module `clock_reduction`
--> src/tests/clock_reduction/clock_removal_test.rs:124:26
|
124 | clock_reduction::clock_reduce(&mut Box::from(l), Some(&mut Box::from(r)), &mut dim, None)
| ^^^^^^^^^^^^ not found in `clock_reduction`
|
help: consider importing this function
|
3 + use crate::transition_systems::clock_reduction::reduction::clock_reduce;
|
help: if you import `clock_reduce`, refer to it directly
|
124 - clock_reduction::clock_reduce(&mut Box::from(l), Some(&mut Box::from(r)), &mut dim, None)
124 + clock_reduce(&mut Box::from(l), Some(&mut Box::from(r)), &mut dim, None)
|
|
no method named `remove_clock` found for struct `model_objects::component::Component` in the current scope:
src/tests/clock_reduction/clock_removal_test.rs#L26
error[E0599]: no method named `remove_clock` found for struct `model_objects::component::Component` in the current scope
--> src/tests/clock_reduction/clock_removal_test.rs:26:19
|
26 | component.remove_clock(clock_index);
| ^^^^^^^^^^^^ method not found in `Component`
|
::: src/model_objects/component.rs:15:1
|
15 | pub struct Component {
| -------------------- method `remove_clock` not found for this struct
|
no method named `replace_clock` found for struct `model_objects::component::Component` in the current scope:
src/tests/clock_reduction/clock_removal_test.rs#L66
error[E0599]: no method named `replace_clock` found for struct `model_objects::component::Component` in the current scope
--> src/tests/clock_reduction/clock_removal_test.rs:66:19
|
66 | component.replace_clock(*clock_1_index, &duplicate_clocks_index);
| ^^^^^^^^^^^^^ method not found in `Component`
|
::: src/model_objects/component.rs:15:1
|
15 | pub struct Component {
| -------------------- method `replace_clock` not found for this struct
|
this looks like a failed attempt at checking for the file extension:
src/data_reader/xml_parser.rs#L17
error: this looks like a failed attempt at checking for the file extension
--> src/data_reader/xml_parser.rs:17:5
|
17 | project_path.as_ref().ends_with(".xml")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `project_path.as_ref().extension().is_some_and(|ext| ext == "xml")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#path_ends_with_ext
= note: `-D clippy::path-ends-with-ext` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::path_ends_with_ext)]`
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/model_objects/declarations.rs#L46
error: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/model_objects/declarations.rs:46:59
|
46 | pub fn remove_clocks(&mut self, clocks_to_be_removed: &Vec<ClockIndex>) {
| ^^^^^^^^^^^^^^^^ help: change this to: `&[ClockIndex]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `-D clippy::ptr-arg` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::ptr_arg)]`
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/transition_systems/clock_reduction/clock_analysis_graph.rs#L45
error: this expression creates a reference which is immediately dereferenced by the compiler
--> src/transition_systems/clock_reduction/clock_analysis_graph.rs:45:51
|
45 | .filter(|clock| !used_clocks.contains(&clock))
| ^^^^^^ help: change this to: `clock`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
|
length comparison to zero:
src/transition_systems/clock_reduction/clock_removal.rs#L45
error: length comparison to zero
--> src/transition_systems/clock_reduction/clock_removal.rs:45:8
|
45 | if new_constraints.len() == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `new_constraints.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `-D clippy::len-zero` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::len_zero)]`
|
unneeded `return` statement:
src/transition_systems/clock_reduction/clock_removal.rs#L108
error: unneeded `return` statement
--> src/transition_systems/clock_reduction/clock_removal.rs:108:5
|
108 | / return Some(create_constraint(
109 | | constraint.i,
110 | | constraint.j,
111 | | constraint.ineq(),
112 | | *remove_clock,
113 | | ));
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `-D clippy::needless-return` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_return)]`
help: remove `return`
|
108 ~ Some(create_constraint(
109 + constraint.i,
110 + constraint.j,
111 + constraint.ineq(),
112 + *remove_clock,
113 ~ ))
|
|
cargo fmt:
src/transition_systems/clock_reduction/clock_analysis_graph.rs#L1
Diff in /home/runner/work/Reveaal/Reveaal/src/transition_systems/clock_reduction/clock_analysis_graph.rs
|
cargo fmt:
src/transition_systems/clock_reduction/clock_analysis_graph.rs#L127
Diff in /home/runner/work/Reveaal/Reveaal/src/transition_systems/clock_reduction/clock_analysis_graph.rs
|
cargo fmt:
src/transition_systems/clock_reduction/clock_analysis_graph.rs#L135
Diff in /home/runner/work/Reveaal/Reveaal/src/transition_systems/clock_reduction/clock_analysis_graph.rs
|
cargo fmt:
src/transition_systems/clock_reduction/clock_analysis_graph.rs#L161
Diff in /home/runner/work/Reveaal/Reveaal/src/transition_systems/clock_reduction/clock_analysis_graph.rs
|
cargo fmt:
src/transition_systems/clock_reduction/clock_reduction_instruction.rs#L1
Diff in /home/runner/work/Reveaal/Reveaal/src/transition_systems/clock_reduction/clock_reduction_instruction.rs
|
cargo fmt:
src/transition_systems/clock_reduction/clock_reduction_instruction.rs#L27
Diff in /home/runner/work/Reveaal/Reveaal/src/transition_systems/clock_reduction/clock_reduction_instruction.rs
|
cargo fmt:
src/transition_systems/clock_reduction/mod.rs#L1
Diff in /home/runner/work/Reveaal/Reveaal/src/transition_systems/clock_reduction/mod.rs
|
cargo fmt:
src/transition_systems/clock_reduction/mod.rs#L6
Diff in /home/runner/work/Reveaal/Reveaal/src/transition_systems/clock_reduction/mod.rs
|