From 0662455111151050617d7120c1e4e7b2dc10529c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 20 Aug 2024 16:17:44 +0200 Subject: [PATCH] Fix formatting of some LMDB tests --- lmdb-master3-sys/tests/simple.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lmdb-master3-sys/tests/simple.rs b/lmdb-master3-sys/tests/simple.rs index fe0da4dd..1eadaee1 100644 --- a/lmdb-master3-sys/tests/simple.rs +++ b/lmdb-master3-sys/tests/simple.rs @@ -46,8 +46,14 @@ fn test_simple(env_path: &str) { let mut env: *mut MDB_env = ptr::null_mut(); let mut dbi: MDB_dbi = 0; - let mut key = MDB_val { mv_size: 0, mv_data: ptr::null_mut() }; - let mut data = MDB_val { mv_size: 0, mv_data: ptr::null_mut() }; + let mut key = MDB_val { + mv_size: 0, + mv_data: ptr::null_mut(), + }; + let mut data = MDB_val { + mv_size: 0, + mv_data: ptr::null_mut(), + }; let mut txn: *mut MDB_txn = ptr::null_mut(); let sval = cstr!("foo").as_ptr() as *mut c_void; let dval = cstr!("bar").as_ptr() as *mut c_void; @@ -59,7 +65,12 @@ fn test_simple(env_path: &str) { E!(mdb_env_open(env, env_path.as_ptr(), 0, 0o664)); E!(mdb_txn_begin(env, ptr::null_mut(), 0, &mut txn)); - E!(mdb_dbi_open(txn, cstr!("subdb").as_ptr(), MDB_CREATE, &mut dbi)); + E!(mdb_dbi_open( + txn, + cstr!("subdb").as_ptr(), + MDB_CREATE, + &mut dbi + )); E!(mdb_txn_commit(txn)); key.mv_size = 3;