mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: update bindgen in libmdbx-rs (#2703)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "reth-mdbx-sys"
|
||||
version = "0.12.1-0"
|
||||
version = "0.12.6-0"
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Rust bindings for libmdbx with good licence."
|
||||
@ -15,4 +15,4 @@ libc = "0.2"
|
||||
|
||||
[build-dependencies]
|
||||
cc = "1.0"
|
||||
bindgen = { version = "0.61", default-features = false, features = ["runtime"] }
|
||||
bindgen = { version = "0.65", default-features = false, features = ["runtime"] }
|
||||
|
||||
7
crates/storage/libmdbx-rs/mdbx-sys/build.rs
vendored
7
crates/storage/libmdbx-rs/mdbx-sys/build.rs
vendored
@ -1,4 +1,7 @@
|
||||
use bindgen::callbacks::{IntKind, ParseCallbacks};
|
||||
use bindgen::{
|
||||
callbacks::{IntKind, ParseCallbacks},
|
||||
Formatter,
|
||||
};
|
||||
use std::{env, path::PathBuf};
|
||||
|
||||
#[derive(Debug)]
|
||||
@ -66,7 +69,7 @@ fn main() {
|
||||
.prepend_enum_name(false)
|
||||
.generate_comments(false)
|
||||
.disable_header_comment()
|
||||
.rustfmt_bindings(true)
|
||||
.formatter(Formatter::Rustfmt)
|
||||
.generate()
|
||||
.expect("Unable to generate bindings");
|
||||
|
||||
|
||||
@ -42,10 +42,7 @@ impl<'tx> TableObject<'tx> for Cow<'tx, [u8]> {
|
||||
#[cfg(not(feature = "return-borrowed"))]
|
||||
{
|
||||
let is_dirty = (!K::ONLY_CLEAN) &&
|
||||
crate::error::mdbx_result::mdbx_result(ffi::mdbx_is_dirty(
|
||||
_txn,
|
||||
data_val.iov_base,
|
||||
))?;
|
||||
crate::error::mdbx_result(ffi::mdbx_is_dirty(_txn, data_val.iov_base))?;
|
||||
|
||||
Ok(if is_dirty { Cow::Owned(s.to_vec()) } else { Cow::Borrowed(s) })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user