-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Display formatted output for JSON diffing in tests. #8692
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks! Instead of using |
5f1bf57
to
4e05def
Compare
O, that's much better yes. 👍 |
match find_json_mismatch(&expected_json, &actual_json) { | ||
Err(e) => { | ||
println!("{}", e); | ||
panic!(); |
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.
Could this perhaps be:
if let Err(e) = ... {
panic!("{}", e);
}
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.
done!
4e05def
to
6dcc5e9
Compare
|
||
if let Err(e) = find_json_mismatch(&expected_json, &actual_json) { | ||
println!("{}", e); | ||
panic!(); |
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.
The println!
and panic!
lines can get folded together here I think with panic!("{}", e)
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.
😅 done
6dcc5e9
to
8d610e1
Compare
@bors: r+ |
📌 Commit 8d610e1 has been approved by |
☀️ Test successful - checks-actions |
Update cargo 6 commits in 875e0123259b0b6299903fe4aea0a12ecde9324f..8777a6b1e8834899f51b7e09cc9b8d85b2417110 2020-09-08 20:17:21 +0000 to 2020-09-15 19:11:03 +0000 - updated yank error message (rust-lang/cargo#8697) - Fix non-determinism with new feature resolver. (rust-lang/cargo#8701) - Display formatted output for JSON diffing in tests. (rust-lang/cargo#8692) - Add --name suggestion for cargo new (rust-lang/cargo#8675) - Sweep unrelated message from unnecessary workspace infromation (rust-lang/cargo#8681) - Docs: Make it more clear we have two types of workspaces (rust-lang/cargo#8666)
This affects all tests that use
validate_upload
.Before
After