From 356497df4e75604c0a99f18c3d004be26e05b762 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Mon, 5 Feb 2024 08:17:25 -0600 Subject: [PATCH] fix some clippy lints --- packages/cli-config/src/config.rs | 7 ++++++- packages/core/src/runtime.rs | 2 +- packages/generational-box/src/unsync.rs | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/cli-config/src/config.rs b/packages/cli-config/src/config.rs index bdfcf016b..3b6024b16 100644 --- a/packages/cli-config/src/config.rs +++ b/packages/cli-config/src/config.rs @@ -392,7 +392,12 @@ impl CrateConfig { None => manifest .bin .iter() - .find(|b| b.name == manifest.package.as_ref().map(|pkg| pkg.name.clone())) + .find(|b| { + #[allow(clippy::useless_asref)] + let matching_bin = + b.name == manifest.package.as_ref().map(|pkg| pkg.name.clone()); + matching_bin + }) .or(manifest .bin .iter() diff --git a/packages/core/src/runtime.rs b/packages/core/src/runtime.rs index 0c17d40fb..4dbfc45a6 100644 --- a/packages/core/src/runtime.rs +++ b/packages/core/src/runtime.rs @@ -11,7 +11,7 @@ use std::{ }; thread_local! { - static RUNTIMES: RefCell>> = RefCell::new(vec![]); + static RUNTIMES: RefCell>> = const { RefCell::new(vec![]) }; } /// A global runtime that is shared across all scopes that provides the async runtime and context API diff --git a/packages/generational-box/src/unsync.rs b/packages/generational-box/src/unsync.rs index 8cdf4444b..e1f5f9df9 100644 --- a/packages/generational-box/src/unsync.rs +++ b/packages/generational-box/src/unsync.rs @@ -85,7 +85,7 @@ impl Storage for UnsyncStorage { } thread_local! { - static UNSYNC_RUNTIME: RefCell>> = RefCell::new(Vec::new()); + static UNSYNC_RUNTIME: RefCell>> = const { RefCell::new(Vec::new()) }; } impl AnyStorage for UnsyncStorage {