Skip to content

Commit e1fd9eb

Browse files
committed
fix up some tests
1 parent da7a09c commit e1fd9eb

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

libmimalloc-sys/src/extended.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,11 +1094,12 @@ extern "C" {
10941094

10951095
#[cfg(test)]
10961096
mod tests {
1097+
use super::super::mi_malloc;
10971098
use super::*;
10981099

10991100
#[test]
11001101
fn it_calculates_usable_size() {
1101-
let ptr = unsafe { crate::mi_malloc(32) } as *mut u8;
1102+
let ptr = unsafe { mi_malloc(32) } as *mut u8;
11021103
let usable_size = unsafe { mi_usable_size(ptr as *mut c_void) };
11031104
assert!(
11041105
usable_size >= 32,

libmimalloc-sys/sys-test/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,11 @@ fn main() {
5555
}
5656
});
5757

58+
if version == "v3" {
59+
cfg.header("mimalloc-stats.h").include(format!(
60+
"{cargo_manifest_dir}/../c_src/mimalloc/{version}/include"
61+
));
62+
}
63+
5864
cfg.generate("../src/lib.rs", "all.rs");
5965
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//! own benchmarks.
2121
//!
2222
//! To enable secure mode, put in `Cargo.toml`:
23-
//! ```rust,ignore
23+
//! ```toml
2424
//! [dependencies]
2525
//! mimalloc = { version = "*", features = ["secure"] }
2626
//! ```

0 commit comments

Comments
 (0)