trussed icon indicating copy to clipboard operation
trussed copied to clipboard

Remove type parameters from Store

Open robin-nitrokey opened this issue 1 year ago • 3 comments

Depends on:

  • https://github.com/trussed-dev/trussed/pull/144

Alternatively, we could completely drop the Store trait and just use a struct with three references. To be tested whether that is more efficient.

robin-nitrokey avatar Dec 15 '23 15:12 robin-nitrokey

 Is this really necessary?

sosthene-nitrokey avatar Dec 15 '23 16:12 sosthene-nitrokey

It is not necessary, but I think it has multiple benefits: It leads to simpler code. It allows us to get rid of the unnecessary Fs type that is just another level of indirection and another static mut. And it allows us to be more flexible in Store implementations, especially e. g. for the virtual runners or when replacing a storage with RAM. So I would rather ask the question: Why do we need these type parameters?

robin-nitrokey avatar Dec 15 '23 19:12 robin-nitrokey

Good!

sosthene-nitrokey avatar Dec 15 '23 19:12 sosthene-nitrokey