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

Add try_from_iter for *MemoryRegion and *RegisterData #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hdoordt
Copy link

@hdoordt hdoordt commented Aug 24, 2023

See #33

@hdoordt hdoordt marked this pull request as draft August 24, 2023 07:40
@diondokter
Copy link
Collaborator

Ah yeah, CI is broken. We can ignore macos and windows.

@hdoordt hdoordt marked this pull request as ready for review August 24, 2023 08:52
@hdoordt
Copy link
Author

hdoordt commented Aug 24, 2023

@diondokter please validate carefully if the new try_from_iter methods actually never panic.

Comment on lines 136 to 139
// Check that all register bytes will fit in `registers`
let num_register_bytes = register_count as usize * register_size;
if num_register_bytes > SIZE {
return Err(LengthTooBig(register_count, register_size));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The tests fail. I think it's because SIZE here is the amount of registers and not the byte count of the registers

Copy link
Author

Choose a reason for hiding this comment

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

@diondokter tests should be fixed now. Thanks for having 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 this pull request may close these issues.

2 participants