From 64054fd2d2a89b86bbcf12bba523d5106c32da6c Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 27 Feb 2025 14:00:49 +0100 Subject: [PATCH] Derive Default if possible This makes it easier to initialize structs without using unsafe code. --- CHANGELOG.md | 4 +++- build.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5f94b6..7090498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- +### Added + +- Derive `Default` if possible ## [0.3.1] - 2025-02-27 diff --git a/build.rs b/build.rs index 1068bfa..db1f7d6 100644 --- a/build.rs +++ b/build.rs @@ -59,6 +59,7 @@ fn main() -> Result<(), Box> { let bindgen = bindgen.clang_arg("-DLFS_MULTIVERSION"); let bindings = bindgen + .derive_default(true) .use_core() .allowlist_item("lfs_.*") .allowlist_item("LFS_.*")