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 empty / error header constructor, put u32::MAX as size for compac… #84

Merged
merged 6 commits into from
Apr 10, 2024

Conversation

Leouarz
Copy link
Contributor

@Leouarz Leouarz commented Apr 10, 2024

…t datalookup in case of error

@@ -33,6 +33,7 @@ pub enum Error {
)]
pub struct DataLookup {
pub(crate) index: Vec<(AppId, DataLookupRange)>,
pub(crate) is_error: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about making DataLookup optional in the header instead of adding is_error?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or even Result?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not in favour of doing drastic changes again, any thoughts @markopoloparadox ?

Copy link
Contributor

@markopoloparadox markopoloparadox Apr 10, 2024

Choose a reason for hiding this comment

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

As discussed in the previous call, we cannot touch CompactDataLookup for the time being. Making DataLookup an Option or Result will not yield the desired outcome since we need that struct to be valid in order to decode it into CompactDataLookup.

IE it easier to add a flag and create a corresponding CompactDataLookup out of it then to write special functions to handle Option<DataLookup> into CompactDataLookup conversion and vice versa

@Leouarz Leouarz marked this pull request as draft April 10, 2024 12:01
@Leouarz Leouarz marked this pull request as ready for review April 10, 2024 12:58
@markopoloparadox markopoloparadox merged commit 9504cdd into main Apr 10, 2024
1 check passed
@markopoloparadox markopoloparadox deleted the ghali/header-error-management branch April 10, 2024 13:55
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.

5 participants