Skip to content

sphere2: API documentation #77

sphere2: API documentation

sphere2: API documentation #77

GitHub Actions / clippy succeeded Oct 27, 2023 in 1s

clippy

7 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 7
Note 0
Help 0

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check warning on line 41 in src/constraints/sphere2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> src/constraints/sphere2.rs:41:35
   |
41 |                 x.copy_from_slice(&center);
   |                                   ^^^^^^^ help: change this to: `center`
   |
   = 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

Check warning on line 38 in src/constraints/rectangle.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

binary comparison to literal `Option::None`

warning: binary comparison to literal `Option::None`
  --> src/constraints/rectangle.rs:38:33
   |
38 |         assert!(xmin != None || xmax != None); // xmin or xmax must be Some
   |                                 ^^^^^^^^^^^^ help: use `Option::is_some()` instead: `xmax.is_some()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none

Check warning on line 38 in src/constraints/rectangle.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

binary comparison to literal `Option::None`

warning: binary comparison to literal `Option::None`
  --> src/constraints/rectangle.rs:38:17
   |
38 |         assert!(xmin != None || xmax != None); // xmin or xmax must be Some
   |                 ^^^^^^^^^^^^ help: use `Option::is_some()` instead: `xmin.is_some()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none
   = note: `#[warn(clippy::partialeq_to_none)]` on by default

Check warning on line 145 in src/alm/alm_problem.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (9/7)

warning: this function has too many arguments (9/7)
   --> src/alm/alm_problem.rs:135:5
    |
135 | /     pub fn new(
136 | |         constraints: ConstraintsType,
137 | |         alm_set_c: Option<AlmSetC>,
138 | |         alm_set_y: Option<LagrangeSetY>,
...   |
144 | |         n2: usize,
145 | |     ) -> Self {
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 167 in src/alm/alm_factory.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> src/alm/alm_factory.rs:158:5
    |
158 | /     pub fn new(
159 | |         f: Cost,
160 | |         df: CostGradient,
161 | |         mapping_f1: Option<MappingF1>,
...   |
166 | |         n2: usize,
167 | |     ) -> Self {
    | |_____________^
    |
    = 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

Check warning on line 65 in src/core/panoc/panoc_optimizer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
  --> src/core/panoc/panoc_optimizer.rs:65:27
   |
65 |     pub fn with_tolerance(mut self, tolerance: f64) -> Self {
   |                           ----^^^^
   |                           |
   |                           help: remove this `mut`

Check warning on line 66 in src/core/fbs/fbs_optimizer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
  --> src/core/fbs/fbs_optimizer.rs:66:9
   |
66 |         mut self,
   |         ----^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default