-
Notifications
You must be signed in to change notification settings - Fork 94
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
implement fmt::Display for Partition #934
base: master
Are you sure you want to change the base?
Conversation
Looks good, but please also use it whenever possible :) |
Pull Request Test Coverage Report for Build 8971001847Details
💛 - Coveralls |
@@ -249,6 +261,7 @@ mod tests { | |||
Arc::new(AtomicU64::new(0)), | |||
Arc::new(AtomicU32::new(0)), | |||
); | |||
println!("{}", partition); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this, don't introduce new prints, instead try to find the places where we print data about partition and use your implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm tempted to write assert_eq!("...", format!("{}", partition);
at the end of one of the existing tests but feel this isn't what you are referring to? i'm new to rust and haven't had much luck searching the tests for println!(...)
or format!(...)
across the test suite. i also tried just throwing a panic in the fmt
function to see in which tests this would surface, but didn't have much luck...
thanks for your patience helping me with this! i appreciate you could probably knock out this PR in seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so i think i now have my code covered with tests, but i'm not sure it's how you would like it implemented @hubcio ! improvements/recommendations welcome!
18fa07a
to
353d9fa
Compare
@alexander-rembridge have you already joined our discord? what's ur username? |
|
Implement the Display functionality for
Partition
(similar to topic.rs )PR raised as an initial response to: #481
Please let me know if you are happy with these changes. If so, I can also implement
Segment
andStream
!