Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method signatures #5

Open
ghost opened this issue Apr 14, 2020 · 4 comments · May be fixed by #6
Open

method signatures #5

ghost opened this issue Apr 14, 2020 · 4 comments · May be fixed by #6

Comments

@ghost
Copy link

ghost commented Apr 14, 2020

encode() and decode() both have failure modes if you pass in a source or destination buffer that is too small but the return type is usize for both encode() and decode().

The _with_offset() routines could likewise be removed, since slices in rust are very cheap.

These are the routines I'm using inline in desert but I considered using this varinteger first:

https://github.com/substack/desert/blob/46789f4af0e98afb80438cb80db573d0d8dbb630/src/lib.rs#L1020-L1054

@okdistribute
Copy link

okdistribute commented Nov 20, 2020

Also ran into this issue trying to use this package. If I put together a pull request, would someone be able to review & publish any relevant changes? (also would be nice to put out feelers for who is actively maintaining this repo!) @yoshuawuyts @Frando @khernyo

@Frando
Copy link
Member

Frando commented Nov 20, 2020

Yup, stumbled over this too and agree. The signatures of the methods @substack posted look good to me! I would review a PR. I don't know if someone actively maintains this currently? If not once we're confident with a 2.0 version (the signature change to return a Result is breaking) I'll look to get it published (there's a few people with publish right to datrs modules, including @bltavares and me) or someone steps up until then I'd say. :-)

@okdistribute
Copy link

Thanks @Frando ! I'll work up a PR soon.

@okdistribute
Copy link

okdistribute commented Mar 12, 2021

Hey, do you have any thoughts on this PR @Frando @substack? Thanks for taking a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants