Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Replace Vec<u8> with slices &[u8] as function parameters #36

Closed
Tracked by #26
matjazv opened this issue Aug 26, 2022 · 0 comments · Fixed by #51
Closed
Tracked by #26

Replace Vec<u8> with slices &[u8] as function parameters #36

matjazv opened this issue Aug 26, 2022 · 0 comments · Fixed by #51

Comments

@matjazv
Copy link
Contributor

matjazv commented Aug 26, 2022

Description

  • if a function has slice as parameter, it could accept both slices or Vectors as its argument
  • Check if any function could accept a fixed size array as a parameter instead of a slice (eg. &[u8; 32] instead of &[u8]). In this case a compiler could verify if a function call has a valid value as argument.

Acceptance Criteria

  • functions have slices &[u8] as parameters instead of vectors Vec<u8>

Additional Information

  • only perform this two actions on a places in the code where and if it makes sense
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants