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

Use slices instead of Vec #1158

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Use slices instead of Vec #1158

wants to merge 1 commit into from

Conversation

Niederb
Copy link
Contributor

@Niederb Niederb commented Jan 26, 2023

This is not really to be merged as it is incomplete. I think it would be a nice, small refactoring though and should be applied to the other functions in the trait (and maybe other traits).

// TODO: improve error handling, using a mut status is not good design?
let mut status: OCallBridgeResult<()> = Ok(());

let mut slice = signed_blocks_encoded;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the "trick": Create a mutable copy of the slice (as decode() needs it). Maybe this could be written nicer?

@Niederb Niederb self-assigned this Jan 26, 2023
@OverOrion OverOrion removed their request for review October 30, 2023 16:14
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 this pull request may close these issues.

1 participant