Skip to content

Added macros print! and println! #430

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

Merged
merged 12 commits into from
Aug 1, 2022
Merged

Conversation

JonahPlusPlus
Copy link
Contributor

Added two macros to print to stdout. If SYSTEM_TABLE is None, they panic.

@JonahPlusPlus
Copy link
Contributor Author

Note: I used core::format_args! inside of itself in println!, instead of core::format_args_nl! since that requires users to add a feature.

Copy link
Collaborator

@GabrielMajeri GabrielMajeri left a comment

Choose a reason for hiding this comment

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

Code looks good overall! I've left some small feedback comments, and also noticed that CI failed due to formatting issues

Copy link
Collaborator

@GabrielMajeri GabrielMajeri left a comment

Choose a reason for hiding this comment

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

Code looks good overall! I've just realized we don't have any tests for these new macros. Could you call them somewhere in the uefi-test-runner crate? We could replace some info! call with println!, for example.

@JonahPlusPlus
Copy link
Contributor Author

OK, will look into it.

@GabrielMajeri
Copy link
Collaborator

Hi @JonahPlusPlus - do you have a status update on this PR?

Tests formatting with macros.
Forgot period
@JonahPlusPlus
Copy link
Contributor Author

Hi @JonahPlusPlus - do you have a status update on this PR?

Apologies, this slipped my mind with other projects.

I added print! and println! calls with formatting to demonstrate their use.

Formatting
clippy doesn't like constant strs in formatting
clippy again
Copy link
Collaborator

@GabrielMajeri GabrielMajeri left a comment

Choose a reason for hiding this comment

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

Thank you, the PR looks good now!

@GabrielMajeri GabrielMajeri changed the title Added macros print! and println! Added macros print! and println! Aug 1, 2022
@GabrielMajeri GabrielMajeri merged commit 77dc2fd into rust-osdev:main Aug 1, 2022
@JonahPlusPlus JonahPlusPlus deleted the print branch November 18, 2024 15:29
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