Skip to content

Commit

Permalink
Rust version bump, address new clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
xnuter committed Nov 11, 2022
1 parent 73d3188 commit b77bf0e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- 1.65.0
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/grcov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
matrix:
os:
- ubuntu-latest
rust:
- stable
- 1.65.0

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
rust: stable
- build: windows
os: windows-latest
rust: stable
rust:
- stable
- 1.65.0

steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- 1.65.0

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "perf-gauge"
version = "0.1.18"
authors = ["Eugene Retunsky"]
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
publish = true
readme = "README.md"
repository = "https://github.com/xnuter/perf-gauge"
Expand Down
6 changes: 3 additions & 3 deletions src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ impl DefaultConsoleReporter {
}

fn build_item_report(&self, metrics: &BenchRunMetricsItem) -> BenchRunReportItem {
let successful_requests = metrics.successful_requests as usize;
let total_requests = metrics.total_requests as usize;
let total_bytes = metrics.total_bytes as usize;
let successful_requests = metrics.successful_requests;
let total_requests = metrics.total_requests;
let total_bytes = metrics.total_bytes;
let duration = Instant::now().duration_since(metrics.bench_begin);
BenchRunReportItem {
test_case_name: self
Expand Down
2 changes: 1 addition & 1 deletion src/prometheus_reporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl PrometheusReporter {

for i in 0..buckets.len() {
for _ in 0..counts[i] {
prometheus_histogram.observe(buckets[i] as f64);
prometheus_histogram.observe(buckets[i]);
}
}

Expand Down

0 comments on commit b77bf0e

Please sign in to comment.