-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use arrays instead of slices and Vecs #33
There are several instance of &[u8] and Vec<u8> being used as argument types for data that is then fallibly converted into a fixed-size array inside the function. Using &[u8; N] or [u8; N] for the argument types instead means that many runtime length checks can be moved from the library's internals all the way out to the API boundary, and eventually removed entirely when the signatures of API functions are updated accordingly in a major update.
- Loading branch information
Showing
7 changed files
with
216 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# TODO | ||
|
||
This file tracks planned changes to the project, especially breaking changes that have to wait | ||
until the next major release. | ||
|
||
## Planned changes for next major release | ||
|
||
- Change argument types in `src/service.rs` for public and private keys to use `[u8; 32]` instead | ||
of `[u8]`. This should remove all the `ProgrammingError`s resulting from failed `try_into()` calls. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.