From 9d4ed68450e20626081e24490ba320278f6d3f7b Mon Sep 17 00:00:00 2001 From: Aaryamann Challani <43716372+rymnc@users.noreply.github.com> Date: Wed, 26 Jul 2023 11:20:33 +0530 Subject: [PATCH] fix: rename close_db_connection to flush (#192) --- rln/src/ffi.rs | 4 ++-- rln/src/public.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rln/src/ffi.rs b/rln/src/ffi.rs index 81dce61..a8a76d5 100644 --- a/rln/src/ffi.rs +++ b/rln/src/ffi.rs @@ -403,8 +403,8 @@ pub extern "C" fn get_metadata(ctx: *const RLN, output_buffer: *mut Buffer) -> b #[allow(clippy::not_unsafe_ptr_arg_deref)] #[no_mangle] -pub extern "C" fn close_db_connection(ctx: *mut RLN) -> bool { - call!(ctx, close_db_connection) +pub extern "C" fn flush(ctx: *mut RLN) -> bool { + call!(ctx, flush) } #[allow(clippy::not_unsafe_ptr_arg_deref)] diff --git a/rln/src/public.rs b/rln/src/public.rs index d32a4b4..e54d157 100644 --- a/rln/src/public.rs +++ b/rln/src/public.rs @@ -1134,7 +1134,7 @@ impl RLN<'_> { /// This function should be called before the RLN object is dropped. /// If not called, the connection will be closed when the RLN object is dropped. /// This improves robustness of the tree. - pub fn close_db_connection(&mut self) -> Result<()> { + pub fn flush(&mut self) -> Result<()> { self.tree.close_db_connection() } } @@ -1387,7 +1387,7 @@ mod test { assert_eq!(root_batch_with_init, root_single_additions); - rln.close_db_connection(); + rln.flush(); } #[test]