Skip to content
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

Remove unused buf field from std.fmt.Parser #21994

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

raindev
Copy link

@raindev raindev commented Nov 15, 2024

And make the initialization less error prone by removing a default for iter, which is required for a functional parser.

And make the initialization less error prone by removing a default for
iter, which is required for a functional parser
@raindev raindev changed the title Remove unused std.fmt.Parser buf field Remove unused buf field from std.fmt.Parser Nov 15, 2024
lib/std/fmt.zig Outdated
@@ -311,10 +310,11 @@ pub const Specifier = union(enum) {
named: []const u8,
};

/// Intended for parsing std.fmt format strings without having to replicate the

Choose a reason for hiding this comment

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

A doc comment should be about the functionality of the commented variable, rather than about its intention.

Something like "A stream based parser for format strings", perhaps.

But "what this does" rather than "why this is here".

Copy link
Author

Choose a reason for hiding this comment

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

Updated the doc to "what-this-is" followed by "when-to-use" 👍

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