3 Commits

Author SHA1 Message Date
dependabot[bot]
476e249be3 Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-27 09:32:39 +01:00
a05739810d Enforce Item granularity 2025-11-27 09:30:03 +01:00
ed6676d345 Avoid broken docs in dependency 2025-11-27 09:30:03 +01:00
4 changed files with 26 additions and 11 deletions

View File

@@ -21,12 +21,12 @@ jobs:
- nightly
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
components: clippy
# Make sure we test with recent deps
- run: cargo update
@@ -34,7 +34,6 @@ jobs:
if: "${{ matrix.rust != '1.74' }}"
- run: cargo build --all-features --all-targets
- run: cargo test --all-features
- run: cargo fmt --all -- --check
# Note: Rust 1.74 doesn't understand edition 2024 formatting so no point
if: "${{ matrix.rust != '1.74' }}"
- run: cargo clippy --all-features --all-targets -- -D warnings
@@ -43,28 +42,37 @@ jobs:
name: MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@v1
- uses: dtolnay/rust-toolchain@1.74
with:
toolchain: "1.70"
# Test everything except experimental features.
- run: cargo test --features backtraces,lock_api,parking_lot
formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Use nightly formatting options
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --check
docs:
name: Documentation build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
- uses: dtolnay/rust-toolchain@nightly
- name: Build documentation
env:
# Build the docs like docs.rs builds it
RUSTDOCFLAGS: --cfg docsrs
run: cargo doc --all-features
run: cargo doc --all-features --no-deps

View File

@@ -1 +1,2 @@
style_edition="2024"
imports_granularity="Item"

View File

@@ -47,6 +47,8 @@ pub use parking_lot::WaitTimeoutResult;
pub mod tracing;
// Skip reformatting the combined imports as it duplicates the guards
#[rustfmt::skip]
#[cfg(debug_assertions)]
pub use tracing::{
FairMutex, FairMutexGuard, MappedFairMutexGuard, MappedMutexGuard, MappedReentrantMutexGuard,
@@ -56,6 +58,7 @@ pub use tracing::{
const_reentrant_mutex, const_rwlock,
};
#[rustfmt::skip]
#[cfg(not(debug_assertions))]
pub use parking_lot::{
FairMutex, FairMutexGuard, MappedFairMutexGuard, MappedMutexGuard, MappedReentrantMutexGuard,

View File

@@ -20,11 +20,14 @@
//! ```
pub use std::sync as raw;
// Skip reformatting the combined imports as it duplicates the guards
#[rustfmt::skip]
#[cfg(not(debug_assertions))]
pub use std::sync::{
Condvar, Mutex, MutexGuard, Once, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
};
#[rustfmt::skip]
#[cfg(debug_assertions)]
pub use tracing::{
Condvar, Mutex, MutexGuard, Once, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,