tokio: update code according to new MSRV (#6764)

This commit is contained in:
Vrtgs
2024-08-11 11:55:22 +02:00
committed by GitHub
parent 6ad1912353
commit 17819062e2
11 changed files with 14 additions and 62 deletions
+3 -3
View File
@@ -461,7 +461,7 @@ impl Spawner {
shutdown_tx: shutdown::Sender,
rt: &Handle,
id: usize,
) -> std::io::Result<thread::JoinHandle<()>> {
) -> io::Result<thread::JoinHandle<()>> {
let mut builder = thread::Builder::new().name((self.inner.thread_name)());
if let Some(stack_size) = self.inner.stack_size {
@@ -497,8 +497,8 @@ cfg_unstable_metrics! {
// Tells whether the error when spawning a thread is temporary.
#[inline]
fn is_temporary_os_thread_error(error: &std::io::Error) -> bool {
matches!(error.kind(), std::io::ErrorKind::WouldBlock)
fn is_temporary_os_thread_error(error: &io::Error) -> bool {
matches!(error.kind(), io::ErrorKind::WouldBlock)
}
impl Inner {