nimdbx
nimdbx copied to clipboard
'pastMinKey' can have side effects
~/nimdbx/nimdbx/Cursor.nim(106, 6) Error: 'pastMinKey' can have side effects
> ~/nimdbx/nimdbx/Cursor.nim(106, 43) Hint: 'pastMinKey' calls `.sideEffect` 'compareKey'
>> ~/nimdbx/nimdbx/Cursor.nim(92, 6) Hint: 'compareKey' called by 'pastMinKey'
Indeed.
Hi, new compiler versions are more strict with func functions. This is probably the reason why this project doesn't compile and emits the error above. You may just change: func -> proc for the two funcs: pastMinKey and pastMaxKey I also added a pull request that fixes the issue.
Fixed as part of #21.
(I’d prefer to leave these as func
and fix the bug by making compareKey
and mdbx_compare_key
(sp?) funcs too, but it’s not a big deal.)