Skip to content

Release 0.11.21

Release 0.11.21 #207

Triggered via pull request August 3, 2024 09:21
@jonhoojonhoo
synchronize #330
0-11-21
Status Success
Total duration 39s
Artifacts

check.yml

on: pull_request
stable / fmt
14s
stable / fmt
nightly / doc
18s
nightly / doc
ubuntu / stable / features
26s
ubuntu / stable / features
Matrix: clippy
Matrix: msrv
Fit to window
Zoom out
Zoom in

Annotations

30 warnings
the borrowed expression implements the required traits: src/flamegraph/mod.rs#L919
warning: the borrowed expression implements the required traits --> src/flamegraph/mod.rs:919:21 | 919 | svg.write_event(&cache_rect) | ^^^^^^^^^^^ help: change this to: `cache_rect` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/flamegraph/mod.rs#L769
warning: the borrowed expression implements the required traits --> src/flamegraph/mod.rs:769:25 | 769 | svg.write_event(&cache_g)?; | ^^^^^^^^ help: change this to: `cache_g` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/flamegraph/mod.rs#L762
warning: the borrowed expression implements the required traits --> src/flamegraph/mod.rs:762:29 | 762 | svg.write_event(&cache_g)?; | ^^^^^^^^ help: change this to: `cache_g` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/flamegraph/mod.rs#L758
warning: the borrowed expression implements the required traits --> src/flamegraph/mod.rs:758:29 | 758 | svg.write_event(&cache_a)?; | ^^^^^^^^ help: change this to: `cache_a` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
redundant guard: src/flamegraph/mod.rs#L620
warning: redundant guard --> src/flamegraph/mod.rs:620:32 | 620 | Some(delta) if delta == 0 => write!( | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards = note: `#[warn(clippy::redundant_guards)]` on by default help: try | 620 - Some(delta) if delta == 0 => write!( 620 + Some(0) => write!( |
usage of a legacy numeric constant: src/flamegraph/color/mod.rs#L395
warning: usage of a legacy numeric constant --> src/flamegraph/color/mod.rs:395:36 | 395 | let hash3 = (hash as f64 / std::u64::MAX as f64) as f32; | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants help: use the associated constant instead | 395 | let hash3 = (hash as f64 / u64::MAX as f64) as f32; | ~~~~~~~~
usage of a legacy numeric constant: src/flamegraph/color/mod.rs#L392
warning: usage of a legacy numeric constant --> src/flamegraph/color/mod.rs:392:36 | 392 | let hash2 = (hash as f64 / std::u64::MAX as f64) as f32; | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants help: use the associated constant instead | 392 | let hash2 = (hash as f64 / u64::MAX as f64) as f32; | ~~~~~~~~
usage of a legacy numeric constant: src/flamegraph/color/mod.rs#L387
warning: usage of a legacy numeric constant --> src/flamegraph/color/mod.rs:387:36 | 387 | let hash1 = (hash as f64 / std::u64::MAX as f64) as f32; | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants = note: `#[warn(clippy::legacy_numeric_constants)]` on by default help: use the associated constant instead | 387 | let hash1 = (hash as f64 / u64::MAX as f64) as f32; | ~~~~~~~~
file opened with `create`, but `truncate` behavior not defined: src/flamegraph/color/palette_map.rs#L104
warning: file opened with `create`, but `truncate` behavior not defined --> src/flamegraph/color/palette_map.rs:104:55 | 104 | let mut file = OpenOptions::new().write(true).create(true).open(path)?; | ^^^^^^^^^^^^- help: add: `.truncate(true)` | = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` = help: alternatively, use `.append(true)` to append to the file instead of overwriting it = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options = note: `#[warn(clippy::suspicious_open_options)]` on by default
this `if` statement can be collapsed: src/collapse/perf.rs#L549
warning: this `if` statement can be collapsed --> src/collapse/perf.rs:549:24 | 549 | } else if self.opt.annotate_jit | ________________________^ 550 | | && ((module.starts_with("/tmp/perf-") && module.ends_with(".map")) 551 | | || (module.contains("/jitted-") && module.ends_with(".so"))) 552 | | { ... | 555 | | } 556 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 549 ~ } else if self.opt.annotate_jit && ((module.starts_with("/tmp/perf-") && module.ends_with(".map")) 550 + || (module.contains("/jitted-") && module.ends_with(".so"))) && !func.contains("_[j]") { 551 + func.push_str("_[j]"); // jitted 552 + } |
stable / clippy
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/
stable / clippy
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
the borrowed expression implements the required traits: src/flamegraph/mod.rs#L919
warning: the borrowed expression implements the required traits --> src/flamegraph/mod.rs:919:21 | 919 | svg.write_event(&cache_rect) | ^^^^^^^^^^^ help: change this to: `cache_rect` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/flamegraph/mod.rs#L769
warning: the borrowed expression implements the required traits --> src/flamegraph/mod.rs:769:25 | 769 | svg.write_event(&cache_g)?; | ^^^^^^^^ help: change this to: `cache_g` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/flamegraph/mod.rs#L762
warning: the borrowed expression implements the required traits --> src/flamegraph/mod.rs:762:29 | 762 | svg.write_event(&cache_g)?; | ^^^^^^^^ help: change this to: `cache_g` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: src/flamegraph/mod.rs#L758
warning: the borrowed expression implements the required traits --> src/flamegraph/mod.rs:758:29 | 758 | svg.write_event(&cache_a)?; | ^^^^^^^^ help: change this to: `cache_a` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
redundant guard: src/flamegraph/mod.rs#L620
warning: redundant guard --> src/flamegraph/mod.rs:620:32 | 620 | Some(delta) if delta == 0 => write!( | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards = note: `#[warn(clippy::redundant_guards)]` on by default help: try | 620 - Some(delta) if delta == 0 => write!( 620 + Some(0) => write!( |
the borrowed expression implements the required traits: src/flamegraph/svg.rs#L144
warning: the borrowed expression implements the required traits --> src/flamegraph/svg.rs:144:50 | 144 | svg.write_event(Event::CData(BytesCData::new(&format!( | __________________________________________________^ 145 | | " 146 | | var nametype = {}; 147 | | var fontsize = {}; ... | 161 | | opt.text_truncate_direction == TextTruncateDirection::Right 162 | | ))))?; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args help: change this to | 144 ~ svg.write_event(Event::CData(BytesCData::new(format!( 145 + " 146 + var nametype = {}; 147 + var fontsize = {}; 148 + var fontwidth = {}; 149 + var xpad = {}; 150 + var inverted = {}; 151 + var searchcolor = '{}'; 152 + var fluiddrawing = {}; 153 + var truncate_text_right = {};\n ", 154 + enquote('\'', &opt.name_type), 155 + opt.font_size, 156 + opt.font_width, 157 + super::XPAD, 158 + opt.direction == Direction::Inverted, 159 + opt.search_color, 160 + opt.image_width.is_none(), 161 + opt.text_truncate_direction == TextTruncateDirection::Right 162 ~ ))))?; |
the borrowed expression implements the required traits: src/flamegraph/svg.rs#L131
warning: the borrowed expression implements the required traits --> src/flamegraph/svg.rs:131:61 | 131 | svg.write_event(Event::Text(BytesText::from_escaped(&format!( | _____________________________________________________________^ 132 | | "#frames > g > rect {{ stroke:{}; stroke-width:1; }}\n", 133 | | strokecolor 134 | | ))))?; | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args help: change this to | 131 ~ svg.write_event(Event::Text(BytesText::from_escaped(format!( 132 + "#frames > g > rect {{ stroke:{}; stroke-width:1; }}\n", 133 + strokecolor 134 ~ ))))?; |
the borrowed expression implements the required traits: src/flamegraph/svg.rs#L123
warning: the borrowed expression implements the required traits --> src/flamegraph/svg.rs:123:57 | 123 | svg.write_event(Event::Text(BytesText::from_escaped(&format!( | _________________________________________________________^ 124 | | " 125 | | text {{ font-family:{}; font-size:{}px }} 126 | | #title {{ text-anchor:middle; font-size:{}px; }} 127 | | ", 128 | | font_type, &opt.font_size, titlesize, 129 | | ))))?; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default help: change this to | 123 ~ svg.write_event(Event::Text(BytesText::from_escaped(format!( 124 + " 125 + text {{ font-family:{}; font-size:{}px }} 126 + #title {{ text-anchor:middle; font-size:{}px; }} 127 + ", 128 + font_type, &opt.font_size, titlesize, 129 ~ ))))?; |
usage of a legacy numeric constant: src/flamegraph/color/mod.rs#L395
warning: usage of a legacy numeric constant --> src/flamegraph/color/mod.rs:395:36 | 395 | let hash3 = (hash as f64 / std::u64::MAX as f64) as f32; | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants help: use the associated constant instead | 395 | let hash3 = (hash as f64 / u64::MAX as f64) as f32; | ~~~~~~~~
usage of a legacy numeric constant: src/flamegraph/color/mod.rs#L392
warning: usage of a legacy numeric constant --> src/flamegraph/color/mod.rs:392:36 | 392 | let hash2 = (hash as f64 / std::u64::MAX as f64) as f32; | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants help: use the associated constant instead | 392 | let hash2 = (hash as f64 / u64::MAX as f64) as f32; | ~~~~~~~~
usage of a legacy numeric constant: src/flamegraph/color/mod.rs#L387
warning: usage of a legacy numeric constant --> src/flamegraph/color/mod.rs:387:36 | 387 | let hash1 = (hash as f64 / std::u64::MAX as f64) as f32; | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants = note: `#[warn(clippy::legacy_numeric_constants)]` on by default help: use the associated constant instead | 387 | let hash1 = (hash as f64 / u64::MAX as f64) as f32; | ~~~~~~~~
this manual char comparison can be written more succinctly: src/flamegraph/color/palettes.rs#L66
warning: this manual char comparison can be written more succinctly --> src/flamegraph/color/palettes.rs:66:20 | 66 | path.split(|c| c == '/' || c == '\\') | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['/', '\\']` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison
file opened with `create`, but `truncate` behavior not defined: src/flamegraph/color/palette_map.rs#L104
warning: file opened with `create`, but `truncate` behavior not defined --> src/flamegraph/color/palette_map.rs:104:55 | 104 | let mut file = OpenOptions::new().write(true).create(true).open(path)?; | ^^^^^^^^^^^^- help: add: `.truncate(true)` | = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` = help: alternatively, use `.append(true)` to append to the file instead of overwriting it = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options = note: `#[warn(clippy::suspicious_open_options)]` on by default
this manual char comparison can be written more succinctly: src/collapse/perf.rs#L417
warning: this manual char comparison can be written more succinctly --> src/collapse/perf.rs:417:27 | 417 | .find(|c| c == ':' || c == ' ') | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[':', ' ']` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison
this manual char comparison can be written more succinctly: src/collapse/dtrace.rs#L264
warning: this manual char comparison can be written more succinctly --> src/collapse/dtrace.rs:264:58 | 264 | if let Some(open) = probe[scope + 2..].rfind(|c| c == '(' || c == '<') { | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['(', '<']` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default
this `if` statement can be collapsed: src/collapse/perf.rs#L549
warning: this `if` statement can be collapsed --> src/collapse/perf.rs:549:24 | 549 | } else if self.opt.annotate_jit | ________________________^ 550 | | && ((module.starts_with("/tmp/perf-") && module.ends_with(".map")) 551 | | || (module.contains("/jitted-") && module.ends_with(".so"))) 552 | | { ... | 555 | | } 556 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 549 ~ } else if self.opt.annotate_jit && ((module.starts_with("/tmp/perf-") && module.ends_with(".map")) 550 + || (module.contains("/jitted-") && module.ends_with(".so"))) && !func.contains("_[j]") { 551 + func.push_str("_[j]"); // jitted 552 + } |
beta / clippy
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/
beta / clippy
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/