diff --git a/crates/bench/benches/generic.rs b/crates/bench/benches/generic.rs index 231171c0521..1013566df8b 100644 --- a/crates/bench/benches/generic.rs +++ b/crates/bench/benches/generic.rs @@ -15,7 +15,7 @@ use spacetimedb_testing::modules::{Csharp, Rust}; #[cfg(target_env = "msvc")] #[global_allocator] -static GLOBAL: MiMalloc = MiMalloc; +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; #[cfg(not(target_env = "msvc"))] use tikv_jemallocator::Jemalloc; diff --git a/crates/bench/benches/special.rs b/crates/bench/benches/special.rs index 73c66dc105a..b3fc0a16bee 100644 --- a/crates/bench/benches/special.rs +++ b/crates/bench/benches/special.rs @@ -14,7 +14,7 @@ use std::sync::OnceLock; #[cfg(target_env = "msvc")] #[global_allocator] -static GLOBAL: MiMalloc = MiMalloc; +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; #[cfg(not(target_env = "msvc"))] use tikv_jemallocator::Jemalloc; diff --git a/crates/core/src/db/relational_db.rs b/crates/core/src/db/relational_db.rs index 9240bef8f26..44eac877818 100644 --- a/crates/core/src/db/relational_db.rs +++ b/crates/core/src/db/relational_db.rs @@ -1741,6 +1741,7 @@ mod tests { use spacetimedb_sats::buffer::BufReader; use spacetimedb_sats::product; use spacetimedb_schema::schema::RowLevelSecuritySchema; + #[cfg(unix)] use spacetimedb_snapshot::Snapshot; use spacetimedb_table::read_column::ReadColumn; use spacetimedb_table::table::RowRef; @@ -2710,6 +2711,7 @@ mod tests { let (dir, repo) = make_snapshot(root.clone(), Identity::ZERO, 0, CompressType::None, true); stdb.take_snapshot(&repo)?; + #[cfg(unix)] let total_objects = repo.size_on_disk()?.object_count; // Another snapshots that will hardlink part of the first one for i in 0..2 { diff --git a/crates/core/src/worker_metrics/mod.rs b/crates/core/src/worker_metrics/mod.rs index ba0c3c8539f..a2301fe720b 100644 --- a/crates/core/src/worker_metrics/mod.rs +++ b/crates/core/src/worker_metrics/mod.rs @@ -231,8 +231,9 @@ use tikv_jemalloc_ctl::{epoch, stats}; use std::sync::Once; use tokio::{spawn, time::sleep}; +#[cfg(not(target_env = "msvc"))] static SPAWN_JEMALLOC_GUARD: Once = Once::new(); -pub fn spawn_jemalloc_stats(node_id: String) { +pub fn spawn_jemalloc_stats(_node_id: String) { #[cfg(not(target_env = "msvc"))] SPAWN_JEMALLOC_GUARD.call_once(|| { spawn(async move { @@ -242,17 +243,17 @@ pub fn spawn_jemalloc_stats(node_id: String) { let allocated = stats::allocated::read().unwrap(); WORKER_METRICS .jemalloc_allocated_bytes - .with_label_values(&node_id) + .with_label_values(&_node_id) .set(allocated as i64); let resident = stats::resident::read().unwrap(); WORKER_METRICS .jemalloc_resident_bytes - .with_label_values(&node_id) + .with_label_values(&_node_id) .set(resident as i64); let active = stats::active::read().unwrap(); WORKER_METRICS .jemalloc_active_bytes - .with_label_values(&node_id) + .with_label_values(&_node_id) .set(active as i64); sleep(Duration::from_secs(10)).await; diff --git a/crates/paths/src/lib.rs b/crates/paths/src/lib.rs index 56c89b29714..ba33336f5dd 100644 --- a/crates/paths/src/lib.rs +++ b/crates/paths/src/lib.rs @@ -268,13 +268,14 @@ impl SpacetimePaths { #[cfg(test)] mod tests { - use std::ffi::{OsStr, OsString}; use std::path::Path; use super::*; + #[cfg(not(windows))] mod vars { use super::*; + use std::ffi::{OsStr, OsString}; struct ResetVar<'a>(&'a str, Option); impl Drop for ResetVar<'_> { fn drop(&mut self) { diff --git a/crates/update/src/proxy.rs b/crates/update/src/proxy.rs index ec5811bc8f2..95d8ef8f2ae 100644 --- a/crates/update/src/proxy.rs +++ b/crates/update/src/proxy.rs @@ -9,7 +9,7 @@ use std::process::ExitCode; pub(crate) fn run_cli( paths: Option<&SpacetimePaths>, - argv0: Option<&OsStr>, + _argv0: Option<&OsStr>, args: Vec, ) -> anyhow::Result { let parse_args = || PartialCliArgs::parse(&args); @@ -44,8 +44,8 @@ pub(crate) fn run_cli( #[cfg(unix)] { use std::os::unix::process::CommandExt; - if let Some(argv0) = argv0 { - cmd.arg0(argv0); + if let Some(_argv0) = _argv0 { + cmd.arg0(_argv0); } }; let exec_result = exec_replace(&mut cmd).with_context(|| format!("exec failed for {}", cli_path.display()));