diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 04ad50b7..2bfe0673 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,7 +9,7 @@ on: env: CARGO_TERM_COLOR: always # Pinned toolchain for linting and benchmarks - ACTIONS_LINTS_TOOLCHAIN: 1.53.0 + ACTIONS_LINTS_TOOLCHAIN: 1.63.0 EXTRA_FEATURES: "protobuf push process" jobs: @@ -72,7 +72,7 @@ jobs: - name: cargo fmt (check) run: cargo fmt --all -- --check -l - name: cargo clippy - run: cargo clippy --all -- -D clippy::all + run: cargo clippy --all criterion: name: "Benchmarks (criterion)" runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index c7f026f6..73cbd46c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.13.2 + +- Bug fix: Fix compilation on 32-bit targets (#446) + ## 0.13.1 - Improvement: ProcessCollector use IntGauge to provide better performance (#430) diff --git a/Cargo.toml b/Cargo.toml index 4199ed4b..35680514 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" name = "prometheus" readme = "README.md" repository = "https://github.com/tikv/rust-prometheus" -version = "0.13.1" +version = "0.13.2" [badges] travis-ci = { repository = "pingcap/rust-prometheus" } diff --git a/src/desc.rs b/src/desc.rs index 70280863..f97b123d 100644 --- a/src/desc.rs +++ b/src/desc.rs @@ -27,7 +27,7 @@ fn is_valid_ident bool>(input: &str, mut charset_validator: F) zeroth .and_then(|zeroth| { if charset_validator(zeroth) { - Some(chars.all(|c| charset_validator(c) || c.is_digit(10))) + Some(chars.all(|c| charset_validator(c) || c.is_ascii_digit())) } else { None } diff --git a/src/histogram.rs b/src/histogram.rs index 025c81d9..78480541 100644 --- a/src/histogram.rs +++ b/src/histogram.rs @@ -516,7 +516,7 @@ impl Instant { } pub fn elapsed(&self) -> Duration { - match &*self { + match self { // We use `saturating_duration_since` to avoid panics caused by non-monotonic clocks. Instant::Monotonic(i) => StdInstant::now().saturating_duration_since(*i), diff --git a/static-metric/src/auto_flush_builder.rs b/static-metric/src/auto_flush_builder.rs index 1c86bcb4..bb0454ca 100644 --- a/static-metric/src/auto_flush_builder.rs +++ b/static-metric/src/auto_flush_builder.rs @@ -196,7 +196,7 @@ impl AutoFlushTokensBuilder { let offset_fetchers = builder_contexts .iter() - .map(|m| offset_fetcher(m)) + .map(offset_fetcher) .collect::>(); let delegator_tokens = if metric_type.to_string().contains("Counter") { diff --git a/static-metric/src/parser.rs b/static-metric/src/parser.rs index 917263b0..3f2a4ee6 100644 --- a/static-metric/src/parser.rs +++ b/static-metric/src/parser.rs @@ -10,6 +10,7 @@ use syn::*; /// Matches `label_enum` keyword. struct LabelEnum { + #[allow(dead_code)] pub span: Span, }