From 444e0efb811fdd59ba4157d56e0dfaea2f08f32f Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 6 Feb 2023 15:30:20 +0800 Subject: [PATCH] jemalloc-sys: bump 0.5.3 (#48) Signed-off-by: Jay Lee --- CHANGELOG.md | 4 ++++ jemalloc-ctl/src/error.rs | 4 ++-- jemalloc-ctl/src/keys.rs | 2 ++ jemalloc-sys/Cargo.toml | 2 +- jemalloc-sys/build.rs | 16 ++++++++-------- jemallocator/tests/background_thread_defaults.rs | 10 ++-------- jemallocator/tests/malloctl.rs | 2 +- jemallocator/tests/smoke.rs | 1 + 8 files changed, 21 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38f46d7cc4..0bd39174c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# jemalloc-sys 0.5.3 - 2023-02-03 + +- Remove fs-extra dependency (#47) + # jemalloc-sys 0.5.2 - 2022-09-29 - Fix build on riscv64gc-unknown-linux-gnu (#40) diff --git a/jemalloc-ctl/src/error.rs b/jemalloc-ctl/src/error.rs index cb1902b41e..46f792514d 100644 --- a/jemalloc-ctl/src/error.rs +++ b/jemalloc-ctl/src/error.rs @@ -34,8 +34,8 @@ impl fmt::Debug for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let code = self.0.get() as c_int; match description(code) { - Some(m) => write!(f, "{}", m), - None => write!(f, "Unknown error code: \"{}\".", code), + Some(m) => write!(f, "{m}"), + None => write!(f, "Unknown error code: \"{code}\"."), } } } diff --git a/jemalloc-ctl/src/keys.rs b/jemalloc-ctl/src/keys.rs index 2a84a4670d..c207025b4e 100644 --- a/jemalloc-ctl/src/keys.rs +++ b/jemalloc-ctl/src/keys.rs @@ -25,6 +25,8 @@ //! } //! ``` +#![allow(clippy::uninlined_format_args)] + use crate::error::Result; use crate::std::str; use crate::{fmt, ops, raw}; diff --git a/jemalloc-sys/Cargo.toml b/jemalloc-sys/Cargo.toml index 5ccfa50f49..05e762b763 100644 --- a/jemalloc-sys/Cargo.toml +++ b/jemalloc-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tikv-jemalloc-sys" -version = "0.5.2+5.3.0-patched" +version = "0.5.3+5.3.0-patched" authors = [ "Alex Crichton ", "Gonzalo Brito Gadeschi ", diff --git a/jemalloc-sys/build.rs b/jemalloc-sys/build.rs index 50efc57b5e..c9e10ffcf3 100644 --- a/jemalloc-sys/build.rs +++ b/jemalloc-sys/build.rs @@ -29,12 +29,12 @@ macro_rules! warning { } fn read_and_watch_env(name: &str) -> Result { - println!("cargo:rerun-if-env-changed={}", name); + println!("cargo:rerun-if-env-changed={name}"); env::var(name) } fn read_and_watch_env_os(name: &str) -> Option { - println!("cargo:rerun-if-env-changed={}", name); + println!("cargo:rerun-if-env-changed={name}"); env::var_os(name) } @@ -212,27 +212,27 @@ fn main() { if !malloc_conf.is_empty() { info!("--with-malloc-conf={}", malloc_conf); - cmd.arg(format!("--with-malloc-conf={}", malloc_conf)); + cmd.arg(format!("--with-malloc-conf={malloc_conf}")); } if let Ok(lg_page) = read_and_watch_env("JEMALLOC_SYS_WITH_LG_PAGE") { info!("--with-lg-page={}", lg_page); - cmd.arg(format!("--with-lg-page={}", lg_page)); + cmd.arg(format!("--with-lg-page={lg_page}")); } if let Ok(lg_hugepage) = read_and_watch_env("JEMALLOC_SYS_WITH_LG_HUGEPAGE") { info!("--with-lg-hugepage={}", lg_hugepage); - cmd.arg(format!("--with-lg-hugepage={}", lg_hugepage)); + cmd.arg(format!("--with-lg-hugepage={lg_hugepage}")); } if let Ok(lg_quantum) = read_and_watch_env("JEMALLOC_SYS_WITH_LG_QUANTUM") { info!("--with-lg-quantum={}", lg_quantum); - cmd.arg(format!("--with-lg-quantum={}", lg_quantum)); + cmd.arg(format!("--with-lg-quantum={lg_quantum}")); } if let Ok(lg_vaddr) = read_and_watch_env("JEMALLOC_SYS_WITH_LG_VADDR") { info!("--with-lg-vaddr={}", lg_vaddr); - cmd.arg(format!("--with-lg-vaddr={}", lg_vaddr)); + cmd.arg(format!("--with-lg-vaddr={lg_vaddr}")); } if use_prefix { @@ -336,7 +336,7 @@ fn run(cmd: &mut Command) { } fn execute(cmd: &mut Command, on_fail: impl FnOnce()) { - println!("running: {:?}", cmd); + println!("running: {cmd:?}"); let status = match cmd.status() { Ok(status) => status, Err(e) => panic!("failed to execute command: {}", e), diff --git a/jemallocator/tests/background_thread_defaults.rs b/jemallocator/tests/background_thread_defaults.rs index 73efe87cc9..0fa7798c85 100644 --- a/jemallocator/tests/background_thread_defaults.rs +++ b/jemallocator/tests/background_thread_defaults.rs @@ -15,15 +15,9 @@ fn background_threads_runtime_defaults() { if !cfg!(feature = "background_threads_runtime_support") { // If the crate was compiled without background thread support, // then background threads are always disabled at run-time by default: - assert_eq!(background_threads(), false); + assert!(!background_threads()); return; } - if cfg!(feature = "background_threads") { - // The crate was compiled with background-threads enabled by default: - assert_eq!(background_threads(), true); - } else { - // The crate was compiled with background-threads disabled by default: - assert_eq!(background_threads(), false); - } + assert_eq!(background_threads(), cfg!(feature = "background_threads")); } diff --git a/jemallocator/tests/malloctl.rs b/jemallocator/tests/malloctl.rs index 74fd2b0e97..155608b7d3 100644 --- a/jemallocator/tests/malloctl.rs +++ b/jemallocator/tests/malloctl.rs @@ -9,7 +9,7 @@ static A: Jemalloc = Jemalloc; fn smoke() { let layout = Layout::from_size_align(100, 8).unwrap(); unsafe { - let ptr = Jemalloc.alloc(layout.clone()); + let ptr = Jemalloc.alloc(layout); assert!(!ptr.is_null()); Jemalloc.dealloc(ptr, layout); } diff --git a/jemallocator/tests/smoke.rs b/jemallocator/tests/smoke.rs index 7fec7fb1df..69b8c4257e 100644 --- a/jemallocator/tests/smoke.rs +++ b/jemallocator/tests/smoke.rs @@ -7,6 +7,7 @@ static A: Jemalloc = Jemalloc; #[test] fn smoke() { let mut a = Vec::new(); + a.reserve(1); a.push(3); }