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: mem: mem.rs -> mem/mod.rs#1251

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
phip1611 merged 3 commits intorust-osdev:mainfromphip1611:mem-module
Jul 22, 2024
Merged

Conversation

phip1611
Copy link
Member

@phip1611phip1611 commentedJul 21, 2024
edited
Loading

Preliminary step for the refactoring request mentioned in#1240 (comment).

Is this the direction you were thinking about? I'd add auefi/mem/memory_map/{mod, ...}.rs in a next step and addpub re-exports in the old location with a deprecation note.

Checklist

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

@phip1611phip1611 changed the titleMem moduleuefi: mem: mem.rs -> mem/mod.rsJul 21, 2024
@phip1611
Copy link
MemberAuthor

Not sure where all of a sudden that CI failure originates from,@nicholasbishop.

@nicholasbishop
Copy link
Member

Interesting, looks like changing the order ofpub mod table/pub mod prelude affects the fully-qualified paths in the compiler's error output:

# old:extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>) -> Status# new:extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>) -> Status

Inlib.rs, movingpub mod prelude to come afterpub mod table restores the old behavior. But, probably better to just update the test expectations with:

TRYBUILD=overwrite cargo xtask test

Copy link
Member

@nicholasbishopnicholasbishop left a comment

Choose a reason for hiding this comment

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

lgtm % updating the test expectations

This is a preliminary measurement to move the types for the uefi memory map (et al.)from the boot services module to this module.
Streamline the order of different statements.1. extern crates2. public modules3. private modules4. public uses5. private useFrom my year-long experience, it is usually a better structure to group all `use`and all `mod` statements in a file. However, it is a matter of taste if `mod`or `use` comes first.
The unit tests for the compiler diagnostics are utilizing the trybuild crate.With the recent reordering of the public exports of uefi/lib.rs, the fully qualifiedpaths have changed.To update the expected error messages, I ran:`$ TRYBUILD=overwrite cargo xtask test`I'm not sure whether the previous changes also change something observable by the publicAPI. In the Rust reference, I couldn't find anything about the fully qualified path and howit is influenced by the order of public exports.
@phip1611phip1611enabled auto-mergeJuly 22, 2024 08:02
@phip1611phip1611 added this pull request to themerge queueJul 22, 2024
Merged via the queue intorust-osdev:main with commit54f7fa2Jul 22, 2024
12 checks passed
@phip1611phip1611 deleted the mem-module branchJuly 22, 2024 08:12
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@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.

2 participants
@phip1611@nicholasbishop

[8]ページ先頭

©2009-2025 Movatter.jp