mini-lsm icon indicating copy to clipboard operation
mini-lsm copied to clipboard

Should function signatures be consistent between mini-lsm-starter and mini-lsm?

Open Gleiphir2769 opened this issue 10 months ago • 1 comments

Hi, I noticed that some function signatures is different beween mini-lsm-starter and mini-lsm.

For example, decode_block_meta in mini-lsm-starter https://github.com/skyzh/mini-lsm/blob/bcaab6f706cb33ebaea6a1f00c444f84d924f309/mini-lsm-starter/src/table.rs#L45-L47

decode_block_meta in mini-lsm https://github.com/skyzh/mini-lsm/blob/bcaab6f706cb33ebaea6a1f00c444f84d924f309/mini-lsm/src/table.rs#L64-L66

According to the commit history, it seems that decode_block_meta in mini-lsm was later modified, causing the function signature to change. I found many similar situations while reading the code.

Does it need to be fixed? If it is, let me know and I can help to fix them.

Gleiphir2769 avatar Apr 13 '24 04:04 Gleiphir2769

&[u8] implements Buf and I believe the interface is fully compatible. Both ways should work.

skyzh avatar Apr 14 '24 13:04 skyzh