Skip to content

Remove reliance on is-terminal #224

Remove reliance on is-terminal

Remove reliance on is-terminal #224

Triggered via push November 19, 2024 11:13
Status Success
Total duration 34s
Artifacts

check.yml

on: push
stable / fmt
15s
stable / fmt
nightly / doc
19s
nightly / doc
ubuntu / stable / features
19s
ubuntu / stable / features
Matrix: clippy
Matrix: msrv
Fit to window
Zoom out
Zoom in

Annotations

22 warnings
the following explicit lifetimes could be elided: 'a: src/bin/flamegraph.rs#L238
warning: the following explicit lifetimes could be elided: 'a --> src/bin/flamegraph.rs:238:6 | 238 | impl<'a> Opt { | ^^ 239 | fn into_parts(self) -> (Vec<PathBuf>, Options<'a>) { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 238 ~ impl Opt { 239 ~ fn into_parts(self) -> (Vec<PathBuf>, Options<'_>) { |
the following explicit lifetimes could be elided: 'a: src/flamegraph/mod.rs#L296
warning: the following explicit lifetimes could be elided: 'a --> src/flamegraph/mod.rs:296:6 | 296 | impl<'a> Default for Options<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 296 - impl<'a> Default for Options<'a> { 296 + impl Default for Options<'_> { |
the following explicit lifetimes could be elided: 'a: src/flamegraph/mod.rs#L266
warning: the following explicit lifetimes could be elided: 'a --> src/flamegraph/mod.rs:266:6 | 266 | impl<'a> Options<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 266 - impl<'a> Options<'a> { 266 + impl Options<'_> { |
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 ~ ))))?; |
the following explicit lifetimes could be elided: 'a: src/flamegraph/svg.rs#L32
warning: the following explicit lifetimes could be elided: 'a --> src/flamegraph/svg.rs:32:6 | 32 | impl<'a> From<usize> for TextArgument<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 32 - impl<'a> From<usize> for TextArgument<'a> { 32 + impl From<usize> for TextArgument<'_> { |
the following explicit lifetimes could be elided: 'a: src/flamegraph/svg.rs#L26
warning: the following explicit lifetimes could be elided: 'a --> src/flamegraph/svg.rs:26:6 | 26 | impl<'a> From<String> for TextArgument<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 26 - impl<'a> From<String> for TextArgument<'a> { 26 + impl From<String> for TextArgument<'_> { |
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
the following explicit lifetimes could be elided: 'a: src/flamegraph/attrs.rs#L137
warning: the following explicit lifetimes could be elided: 'a --> src/flamegraph/attrs.rs:137:6 | 137 | impl<'a> Iterator for AttrIter<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 137 - impl<'a> Iterator for AttrIter<'a> { 137 + impl Iterator for AttrIter<'_> { |
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
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 ~ ))))?; |
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
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
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 use a deprecated Node.js version 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/
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 use a deprecated Node.js version 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/