mirror of
https://github.com/bertptrs/tracing-mutex.git
synced 2025-12-25 12:40:31 +01:00
Enforce Item granularity
This commit is contained in:
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
@@ -23,10 +23,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@v1
|
- uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
components: rustfmt, clippy
|
components: clippy
|
||||||
|
|
||||||
# Make sure we test with recent deps
|
# Make sure we test with recent deps
|
||||||
- run: cargo update
|
- run: cargo update
|
||||||
@@ -44,13 +44,24 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@v1
|
- uses: dtolnay/rust-toolchain@1.74
|
||||||
with:
|
with:
|
||||||
toolchain: "1.70"
|
toolchain: "1.70"
|
||||||
|
|
||||||
# Test everything except experimental features.
|
# Test everything except experimental features.
|
||||||
- run: cargo test --features backtraces,lock_api,parking_lot
|
- run: cargo test --features backtraces,lock_api,parking_lot
|
||||||
|
|
||||||
|
formatting:
|
||||||
|
name: Formatting
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
# Use nightly formatting options
|
||||||
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
|
with:
|
||||||
|
components: rustfmt
|
||||||
|
- run: cargo fmt --check
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
name: Documentation build
|
name: Documentation build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -58,9 +69,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@v1
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
|
||||||
toolchain: nightly
|
|
||||||
|
|
||||||
- name: Build documentation
|
- name: Build documentation
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
style_edition="2024"
|
style_edition="2024"
|
||||||
|
imports_granularity="Item"
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ pub use parking_lot::WaitTimeoutResult;
|
|||||||
|
|
||||||
pub mod tracing;
|
pub mod tracing;
|
||||||
|
|
||||||
|
// Skip reformatting the combined imports as it duplicates the guards
|
||||||
|
#[rustfmt::skip]
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
pub use tracing::{
|
pub use tracing::{
|
||||||
FairMutex, FairMutexGuard, MappedFairMutexGuard, MappedMutexGuard, MappedReentrantMutexGuard,
|
FairMutex, FairMutexGuard, MappedFairMutexGuard, MappedMutexGuard, MappedReentrantMutexGuard,
|
||||||
@@ -56,6 +58,7 @@ pub use tracing::{
|
|||||||
const_reentrant_mutex, const_rwlock,
|
const_reentrant_mutex, const_rwlock,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[rustfmt::skip]
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
pub use parking_lot::{
|
pub use parking_lot::{
|
||||||
FairMutex, FairMutexGuard, MappedFairMutexGuard, MappedMutexGuard, MappedReentrantMutexGuard,
|
FairMutex, FairMutexGuard, MappedFairMutexGuard, MappedMutexGuard, MappedReentrantMutexGuard,
|
||||||
|
|||||||
@@ -20,11 +20,14 @@
|
|||||||
//! ```
|
//! ```
|
||||||
pub use std::sync as raw;
|
pub use std::sync as raw;
|
||||||
|
|
||||||
|
// Skip reformatting the combined imports as it duplicates the guards
|
||||||
|
#[rustfmt::skip]
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
pub use std::sync::{
|
pub use std::sync::{
|
||||||
Condvar, Mutex, MutexGuard, Once, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
|
Condvar, Mutex, MutexGuard, Once, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[rustfmt::skip]
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
pub use tracing::{
|
pub use tracing::{
|
||||||
Condvar, Mutex, MutexGuard, Once, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
|
Condvar, Mutex, MutexGuard, Once, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
|
||||||
|
|||||||
Reference in New Issue
Block a user