ndelvalle / rustdis

Partial Redis server implementation using Rust for learning purposes.
https://docs.rs/rustdis
0 stars 0 forks source link

Create exec method on cmds #15

Closed ndelvalle closed 6 months ago

ndelvalle commented 6 months ago

Looking good!

Since all the commands are implementing the same method, maybe we could define a trait and implement that. If the only difference is that some cases take the store, we could pass the store to all commands. Or have two different traits.

Wdyt?

Yeah, good idea, maybe that way we somehow could remove this https://github.com/ndelvalle/rustdis/pull/15/files#diff-bf2f650cdc66abd13076c47b25e8c9f783f06ec335bbd30822fdd690547615fdR46-R58