feat: added a Nix Flake to build Mandelbrot using Naersk #50
Annotations
1 error and 14 warnings
build
Process completed with exit code 101.
|
build
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
`to_string` applied to a type that implements `Display` in `eprintln!` args:
src/lib.rs#L320
warning: `to_string` applied to a type that implements `Display` in `eprintln!` args
--> src/lib.rs:320:154
|
320 | ...led(s) => eprintln!("Failed to create window: {}", s.to_string()),
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
note: the lint level is defined here
--> src/lib.rs:6:5
|
6 | clippy::perf,
| ^^^^^^^^^^^^
= note: `#[warn(clippy::to_string_in_format_args)]` implied by `#[warn(clippy::perf)]`
|
strict comparison of `f32` or `f64`:
src/lib.rs#L157
warning: strict comparison of `f32` or `f64`
--> src/lib.rs:157:20
|
157 | if config.window_scale == 1.0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(config.window_scale - 1.0).abs() < error_margin`
|
= note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp
= note: `#[warn(clippy::float_cmp)]` implied by `#[warn(clippy::pedantic)]`
|
this function has too many arguments (10/7):
src/lib.rs#L127
warning: this function has too many arguments (10/7)
--> src/lib.rs:127:1
|
127 | fn handle_key_events(window: &Window, c: &mut ComplexPlane, p: &mut PixelBuffer, m: &mut MandelbrotSet, vars: &mut InteractionVariables, k: &KeyBindings, supersampling_amount: &mut u8, image_supersampling_amount: &mut u8,coloring_function: &mut ColoringFunction, config: &Config...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
note: the lint level is defined here
--> src/lib.rs:9:5
|
9 | clippy::complexity
| ^^^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::too_many_arguments)]` implied by `#[warn(clippy::complexity)]`
|
docs for function which may panic missing `# Panics` section:
src/user_input.rs#L25
warning: docs for function which may panic missing `# Panics` section
--> src/user_input.rs:25:1
|
25 | pub fn get_user_input_untrimmed() -> String {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/user_input.rs:28:5
|
28 | / io::stdin()
29 | | .read_line(&mut user_input)
30 | | .expect("Error: Failed to read the user's input from stdin.");
| |_________________________________________________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
|
docs for function which may panic missing `# Panics` section:
src/coloring.rs#L117
warning: docs for function which may panic missing `# Panics` section
--> src/coloring.rs:117:5
|
117 | pub fn get_color(&self, color: char) -> u8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/coloring.rs:118:9
|
118 | assert!(color == 'R' || color == 'G' || color == 'B', "Error: color should be equal to R, G, or B, color = {}",color);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`
|
docs for function returning `Result` missing `# Errors` section:
src/coloring.rs#L43
warning: docs for function returning `Result` missing `# Errors` section
--> src/coloring.rs:43:5
|
43 | pub fn new(r_g_b: &str) -> Result<ColorChannelMapping,String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
= note: `#[warn(clippy::missing_errors_doc)]` implied by `#[warn(clippy::pedantic)]`
|
item in documentation is missing backticks:
src/coloring.rs#L10
warning: item in documentation is missing backticks
--> src/coloring.rs:10:10
|
10 | /// E.g: Ok(ColorChannelMapping::BGR) means that red will get the value of blue, green the value of green, and blue the value of red:
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
10 | /// E.g: `Ok(ColorChannelMapping::BGR`) means that red will get the value of blue, green the value of green, and blue the value of red:
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
item in documentation is missing backticks:
src/coloring.rs#L8
warning: item in documentation is missing backticks
--> src/coloring.rs:8:19
|
8 | ///A mapping from ColorChannelMapping -> RGB, the first character denotes the new red channel, the second character the new green channel,
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
8 | ///A mapping from `ColorChannelMapping` -> RGB, the first character denotes the new red channel, the second character the new green channel,
| ~~~~~~~~~~~~~~~~~~~~~
|
the function has a cognitive complexity of (7/5):
src/rendering.rs#L81
warning: the function has a cognitive complexity of (7/5)
--> src/rendering.rs:81:41
|
81 | let handle = thread::spawn(move || {
| ^^
|
= help: you could split it up into multiple smaller functions
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
note: the lint level is defined here
--> src/lib.rs:4:5
|
4 | clippy::nursery,
| ^^^^^^^^^^^^^^^
= note: `#[warn(clippy::cognitive_complexity)]` implied by `#[warn(clippy::nursery)]`
|
item in documentation is missing backticks:
src/complex_plane.rs#L98
warning: item in documentation is missing backticks
--> src/complex_plane.rs:98:102
|
98 | /// Resets the total translation and scaling applied to the Complex plane by the translate() and scale() functions
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
98 | /// Resets the total translation and scaling applied to the Complex plane by the translate() and `scale()` functions
| ~~~~~~~~~
|
item in documentation is missing backticks:
src/complex_plane.rs#L98
warning: item in documentation is missing backticks
--> src/complex_plane.rs:98:86
|
98 | /// Resets the total translation and scaling applied to the Complex plane by the translate() and scale() functions
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
note: the lint level is defined here
--> src/lib.rs:3:5
|
3 | clippy::pedantic,
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::doc_markdown)]` implied by `#[warn(clippy::pedantic)]`
help: try
|
98 | /// Resets the total translation and scaling applied to the Complex plane by the `translate()` and scale() functions
| ~~~~~~~~~~~~~
|
clippy_check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/
|