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

Review… #10

Merged
merged 8 commits into from Dec 18, 2021
Merged

Review… #10

merged 8 commits into from Dec 18, 2021

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Dec 18, 2021

The code looks good, at least given my understanding of DWARF which is definitely not super extensive.

I ended up with just a couple style nits and whatnot, best reviewed commit-by-commit.

The first paragraph of the documentation ends up as a summary line on
rustdoc; having it be a single short sentence integrates well with this
behaviour.
Clarifies what is being referenced from where, I think.
This binary is called thorin after all, so `RUST_DWP_LOG` seems quite
arbitrary?
The `expect` in there looked quite out-of-place and I was going to
replace it with a `match` over `self.$name`, before realizing this was
“just” `get_or_insert_with`.
We are iterating over all of the sections of an input file, and while
all section names we care about are UTF-8, we don't necessarily care
that the other sections are valid UTF-8. This commit would allow us to
handle those files correctly, still.
Accessing here may mean decompression, which can have a non-trivial
cost. We're only interested in very specific sections, no need to try
accessing all of them.
Having two distinct values representing the same information can lead to
accidental divergence and be a source of bugs further down the line.
@davidtwco davidtwco self-assigned this Dec 18, 2021
Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

Thanks for the review and changes, these all look great.

thorin-bin/src/main.rs Show resolved Hide resolved
@davidtwco davidtwco merged commit 1dcaa5b into rust-lang:main Dec 18, 2021
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.

None yet

2 participants