tikv / pprof-rs

A Rust CPU profiler implemented with the help of backtrace-rs
Apache License 2.0
1.3k stars 99 forks source link

Make clippy happy #141

Closed Xuanwo closed 2 years ago

Xuanwo commented 2 years ago

Clippy is not happy for a lot of reasons:

error: this import is redundant
 --> examples/prime_number.rs:3:1
  |
3 | use pprof;
  | ^^^^^^^^^^ help: remove it entirely
  |
  = note: `-D clippy::single-component-path-imports` implied by `-D warnings`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports

error: this import is redundant
 --> examples/malloc_hook.rs:5:1
  |
5 | use pprof;
  | ^^^^^^^^^^ help: remove it entirely
  |
  = note: `-D clippy::single-component-path-imports` implied by `-D warnings`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports

error: this import is redundant
 --> examples/flamegraph.rs:3:1
  |
3 | use pprof;
  | ^^^^^^^^^^ help: remove it entirely
  |
  = note: `-D clippy::single-component-path-imports` implied by `-D warnings`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports

Let's address all of them and make clippy happy.