Skip to content

Conversation

nicholasbishop
Copy link
Member

For example, instead of this:

#[unsafe_protocol("12345678-1234-5678-1234-567812345678")]

You can do this:

#[unsafe_protocol(path::of::some::guid::constant)]

This is helpful to avoid repeating the GUID if you happen to have it defined somewhere else already.

Checklist

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

For example, instead of this:

`#[unsafe_protocol("12345678-1234-5678-1234-567812345678")]`

You can do this:

`#[unsafe_protocol(path::of::some::guid::constant)]`

This is helpful to avoid repeating the GUID if you happen to have it defined
somewhere else already.
@phip1611
Copy link
Member

Nice! I think, it would be good to have a small unit test to ensure that both variants compile.

@nicholasbishop
Copy link
Member Author

The docstring example gets run during unit tests, so I think we're good there.

@phip1611
Copy link
Member

Ah, right. Sorry, I missed that.

@phip1611 phip1611 merged commit b5d0f49 into rust-osdev:main Apr 13, 2023
@nicholasbishop nicholasbishop deleted the bishop-guid-const branch April 14, 2023 00:19
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