rosedblabs / rosedb

Lightweight, fast and reliable key/value storage engine based on Bitcask.

Home Page:https://rosedblabs.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use function instead of closures

zll600 opened this issue · comments

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

The code of these closures is too long, resulting in a large amount of code for this function, and these closures only capture the variable db.
image

Describe the solution you'd like
A clear and concise description of what you want to happen.

Rewrite these closures with functions.

Additional context
Add any other context or screenshots about the feature request here.

Hi @zll600. You might be right, closures can be converted to functions. What does @roseduan think about it?

Thanks! I am refactoring the project, and I will consider your opinion.