pickledb-rs icon indicating copy to clipboard operation
pickledb-rs copied to clipboard

Add `load_or_new` function that loads a DB if available, and if not, create DB

Open sigaloid opened this issue 4 years ago • 6 comments

sigaloid avatar Dec 13 '21 23:12 sigaloid

Thanks for your contribution @sigaloid ! Can you please fix the clippy errors before we merge your PR?

Also - it'd be great if you can add a test.

seladb avatar Jan 09 '22 03:01 seladb

Hi, I think I've fixed the clippy error. Also, I'm unfamiliar with the test structure so a test that I write would likely not help very much or be poorly written :pensive:

sigaloid avatar Feb 26 '22 22:02 sigaloid

@sigaloid I'm sorry for the late response. I think you can add a simple test here: https://github.com/seladb/pickledb-rs/blob/master/tests/pickledb_key_value_tests.rs

Also - the clippy errors were fixed here: https://github.com/seladb/pickledb-rs/pull/25 so you can update your branch and it should work now

seladb avatar Apr 17 '22 22:04 seladb

Successfully added tests, looks like it's passing in my repo but needs a maintainer to run here.

sigaloid avatar May 30 '22 01:05 sigaloid

@sigaloid please see a few clippy and fmt issues

seladb avatar Jan 23 '23 08:01 seladb