jellyfish icon indicating copy to clipboard operation
jellyfish copied to clipboard

Ergonomic conversion of HasherNode to byte slice

Open ggutoski opened this issue 1 year ago • 2 comments

In order to get a &[u8] from a HasherNode downstream users must do .as_ref().as_ref(). Example: https://github.com/EspressoSystems/HotShot/pull/2397#discussion_r1451628631

The acceptable number of .as_ref() to force upon downstream users is at most 1.

ggutoski avatar Jan 24 '24 01:01 ggutoski

Might be missing something but it is not clear to me why this cannot be handled in a simple manner on the Hotshot side like this: https://github.com/EspressoSystems/HotShot/pull/2892

akonring avatar Apr 03 '24 10:04 akonring

In that case, it seems there is no problem. I'm a bit surprised it works now with only one .as_ref(). I wonder whether somebody quietly slipped in a fix without noticing.

ggutoski avatar Apr 04 '24 13:04 ggutoski