Skip to content

Commit

Permalink
Tune up lints for 1.81 Rust
Browse files Browse the repository at this point in the history
- bump up MSRV to 1.81
  • Loading branch information
tyranron committed Sep 6, 2024
1 parent bccfb20 commit 0d9dddb
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
strategy:
fail-fast: false
matrix:
msrv: ["1.70.0"]
msrv: ["1.81.0"]
os: ["ubuntu", "macOS", "windows"]
runs-on: ${{ matrix.os }}-latest
steps:
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ All user visible changes to this project will be documented in this file. This p



## [0.2.0] · 202?-??-?? (unreleased)
[0.2.0]: /../../tree/v0.2.0

[Diff](/../../compare/v0.1.1...v0.2.0)

### BC Breaks

- Bumped up [MSRV] to 1.81 because for `#[expect]` attribute usage. ([todo])

[todo]: /../../commit/todo




## [0.1.1] · 2023-12-04
[0.1.1]: /../../tree/v0.1.1

Expand Down Expand Up @@ -33,4 +47,5 @@ All user visible changes to this project will be documented in this file. This p



[MSRV]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field
[Semantic Versioning 2.0.0]: https://semver.org
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "tracing-record-hierarchical"
version = "0.1.1"
edition = "2021"
rust-version = "1.70"
rust-version = "1.81"
description = "Record parent `tracing::Span` fields from inside child `tracing::Span`'s context."
authors = ["Instrumentisto Team <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
=============================

[![crates.io](https://img.shields.io/crates/v/tracing-record-hierarchical.svg "crates.io")](https://crates.io/crates/tracing-record-hierarchical)
[![Rust 1.70+](https://img.shields.io/badge/rustc-1.70+-lightgray.svg "Rust 1.70+")](https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html)
[![Rust 1.81+](https://img.shields.io/badge/rustc-1.81+-lightgray.svg "Rust 1.81+")](https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html)
[![Unsafe Forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg "Unsafe forbidden")](https://github.com/rust-secure-code/safety-dance)
[![CI](https://github.com/instrumentisto/tracing-record-hierarchical-rs/workflows/CI/badge.svg?branch=main "CI")](https://github.com/instrumentisto/tracing-record-hierarchical-rs/actions?query=workflow%3ACI+branch%3Amain)
[![Rust docs](https://docs.rs/tracing-record-hierarchical/badge.svg "Rust docs")](https://docs.rs/tracing-record-hierarchical)
Expand Down
9 changes: 8 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
#![forbid(non_ascii_idents, unsafe_code)]
#![warn(
clippy::absolute_paths,
clippy::allow_attributes,
clippy::allow_attributes_without_reason,
clippy::as_conversions,
clippy::as_ptr_cast_mut,
clippy::assertions_on_result_states,
clippy::branches_sharing_code,
clippy::cfg_not_test,
clippy::clear_with_drain,
clippy::clone_on_ref_ptr,
clippy::collection_is_never_read,
Expand Down Expand Up @@ -96,6 +99,7 @@
clippy::rest_pat_in_fully_bound_structs,
clippy::same_name_method,
clippy::semicolon_inside_block,
clippy::set_contains_or_insert,
clippy::shadow_unrelated,
clippy::significant_drop_in_scrutinee,
clippy::significant_drop_tightening,
Expand Down Expand Up @@ -236,7 +240,10 @@ where
V: field::Value,
{
_ = span.with_subscriber(|(id, dispatch)| {
#[allow(clippy::expect_used)] // intentional
#[expect( // intentional
clippy::expect_used,
reason = "no other error reporting is possible here",
)]
let ctx = dispatch.downcast_ref::<HierarchicalRecord>().expect(
"add `HierarchicalRecord` `Layer` to your `tracing::Subscriber`",
);
Expand Down

0 comments on commit 0d9dddb

Please sign in to comment.