struct-patch 0.14.4

A library that helps you implement partial updates for your structs.
Documentation
1
2
3
4
5
6
7
8
9
fn main() {
    println!("cargo:rustc-check-cfg=cfg(use_alloc)");

    let on = |name: &str| std::env::var_os(format!("CARGO_FEATURE_{name}")).is_some();

    if on("ALLOC") || (on("NESTING") && on("LOG")) {
        println!("cargo:rustc-cfg=use_alloc");
    }
}