mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
style: rust warning (#2776)
This commit is contained in:
parent
67449f1917
commit
a30d42c624
@ -1,4 +1,6 @@
|
||||
use std::cell::{Cell, LazyCell, RefCell};
|
||||
#[cfg(not(feature = "noop"))]
|
||||
use std::cell::Cell;
|
||||
use std::cell::{LazyCell, RefCell};
|
||||
#[cfg(not(feature = "noop"))]
|
||||
use std::collections::HashSet;
|
||||
#[cfg(not(feature = "noop"))]
|
||||
@ -8,8 +10,10 @@ use std::mem::MaybeUninit;
|
||||
#[cfg(not(feature = "noop"))]
|
||||
use std::ptr;
|
||||
#[cfg(not(feature = "noop"))]
|
||||
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||
use std::sync::{LazyLock, RwLock};
|
||||
use std::sync::{
|
||||
atomic::{AtomicBool, AtomicUsize, Ordering},
|
||||
LazyLock, RwLock,
|
||||
};
|
||||
use std::{any::TypeId, collections::HashMap};
|
||||
|
||||
use rustc_hash::FxBuildHasher;
|
||||
|
||||
@ -117,7 +117,7 @@ pub fn block_on<F: Future>(fut: F) -> F::Output {
|
||||
/// Runs a future to completion
|
||||
/// This is blocking, meaning that it pauses other execution until the future is complete,
|
||||
/// only use it when it is absolutely necessary, in other places use async functions instead.
|
||||
pub fn block_on<F: Future>(fut: F) -> F::Output {
|
||||
pub fn block_on<F: Future>(_: F) -> F::Output {
|
||||
unreachable!("noop feature is enabled, block_on is not available")
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user