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 trait bound on VerbosityFilter in the generic data types slide #2603

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

randomPoison
Copy link
Collaborator

It's generally more idiomatic in Rust to not have trait bounds on the data type itself. I think we better demonstrate how trait bounds are used in impl blocks with generic data types in the impl block below the struct definition. I've also added a speaker note to call this out if students ask.

@djmitche djmitche self-requested a review January 31, 2025 17:33
Copy link
Collaborator

@djmitche djmitche left a comment

Choose a reason for hiding this comment

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

I don't agree with this idiom, but you're right that it's idiomatic :)

@djmitche djmitche merged commit abf9393 into main Feb 3, 2025
37 checks passed
@djmitche djmitche deleted the legare/logger-remove-trait-bound branch February 3, 2025 18:57
michael-kerscher pushed a commit to michael-kerscher/comprehensive-rust that referenced this pull request Feb 7, 2025
…de (google#2603)

It's generally more idiomatic in Rust to not have trait bounds on the
data type itself. I think we better demonstrate how trait bounds are
used in impl blocks with generic data types in the impl block below the
struct definition. I've also added a speaker note to call this out if
students ask.
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