diff options
| author | Markus Reiter <me@reitermark.us> | 2024-02-08 23:03:25 +0100 | 
|---|---|---|
| committer | Markus Reiter <me@reitermark.us> | 2024-02-15 08:09:42 +0100 | 
| commit | a90cc05233858fcd16c3ca0e0b4320fc5ae09af2 (patch) | |
| tree | 003c31cd913ce7f1acb1bd12aeca0fcde1ccfee6 /compiler/rustc_query_impl/src | |
| parent | 746a58d4359786e4aebb372a30829706fa5a968f (diff) | |
| download | rust-a90cc05233858fcd16c3ca0e0b4320fc5ae09af2.tar.gz rust-a90cc05233858fcd16c3ca0e0b4320fc5ae09af2.zip | |
Replace `NonZero::<_>::new` with `NonZero::new`.
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 8cbcce986a1..5917d79983d 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -68,10 +68,8 @@ impl QueryContext for QueryCtxt<'_> { #[inline] fn next_job_id(self) -> QueryJobId { QueryJobId( - NonZero::<u64>::new( - self.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed), - ) - .unwrap(), + NonZero::new(self.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed)) + .unwrap(), ) } | 
