Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

uefi: Make TimeError more descriptive#1211

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
github-merge-queue merged 1 commit intorust-osdev:mainfromandre-braga:display
Jun 20, 2024

Conversation

andre-braga
Copy link
Contributor

When returning a TimeError, it'd be helpful to specify to the user which field is invalid so that it can be handled accordingly, or at least communicated. This change does this by reimplementing TimeError as an enum instead of a struct, allowing for specification and more verbose error display.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See theRewriting History guide for help.
  • Update the changelog (if necessary)

@andre-braga
Copy link
ContributorAuthor

Is there a reason for no top level enums inuefi-raw? If not I can add it to xtask, or just place this intouefi instead.

@andre-braga
Copy link
ContributorAuthor

Ah, I see the relevant section inapi_guidelines now, I'll go about changing things

@andre-bragaandre-braga marked this pull request as draftJune 17, 2024 18:16
@andre-bragaandre-braga marked this pull request as ready for reviewJune 17, 2024 20:21
@phip1611
Copy link
Member

LGTM apart from#1211 (review)

@andre-bragaandre-braga marked this pull request as draftJune 20, 2024 13:04
@andre-bragaandre-braga changed the titleuefi-raw: Make TimeError more descriptiveuefi: Make TimeError more descriptiveJun 20, 2024
@andre-bragaandre-braga marked this pull request as ready for reviewJune 20, 2024 13:18
@andre-braga
Copy link
ContributorAuthor

andre-braga commentedJun 20, 2024
edited
Loading

I instead went with the struct method, allowing one to specify multiple errors.

Is thiserr == TimeError::default() idea that I've used idiomatic?

@phip1611
Copy link
Member

I instead went with the struct method, allowing one to specify multiple errors.

Is thiserr == TimeError::default() idea that I've used idiomatic?

We're almost there. Just add one more comment and we are good to go

andre-braga reacted with thumbs up emoji

When returning a TimeError, it'd be helpful to specify to the user which fieldis invalid so that it can be handled accordingly, or at least communicated. Thischange does this by adding bool fields to the TimeError struct, representing thevalidity of each field of a Time struct.
@nicholasbishopnicholasbishop added this pull request to themerge queueJun 20, 2024
@github-merge-queuegithub-merge-queuebot merged commitd7fa166 intorust-osdev:mainJun 20, 2024
12 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@phip1611phip1611phip1611 left review comments

@nicholasbishopnicholasbishopnicholasbishop approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@andre-braga@phip1611@nicholasbishop

[8]ページ先頭

©2009-2025 Movatter.jp