Skip to content

Conversation

@phip1611
Copy link
Member

@phip1611 phip1611 commented Jan 1, 2026

uefi is supposed to provide convenient and idiomatic high-level
abstractions. Currently, find_handles() and locate_handle() can
never return &[] respectively Vec::new() as an empty response
from the underlying UEFI boot service is always treated as Error
originating from Status::NOT_FOUND.

We should not expose that UEFI implementation details to users. It is
more convenient for users to just check if the resulting slice/vector
is empty or not.

Closes #1854

Steps to Undraft

  • do what nicholas suggested here instead as it is clearly the better solution

Checklist

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

@phip1611 phip1611 self-assigned this Jan 1, 2026
`uefi` is supposed to provide convenient and idiomatic high-level
abstractions. Currently, `find_handles()` and `locate_handle()` can
never return `&[]` respectively `Vec::new()` as an empty response
from the underlying UEFI boot service is always treated as Error
originating from `Status::NOT_FOUND`.

We should not expose that UEFI implementation details to users. It is
more convenient for users to just check if the resulting slice/vector
is empty or not.
@phip1611 phip1611 force-pushed the find-handles branch 2 times, most recently from c0ef184 to 8b3fc1d Compare January 1, 2026 15:42
@nicholasbishop
Copy link
Member

Left some design thoughts in the issue: #1854 (comment)

@phip1611 phip1611 marked this pull request as draft January 2, 2026 13:40
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.

find_handles(): should return empty vec instead of Status::NotFound

3 participants