Skip to content

Refactor layout #14

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

Merged
merged 1 commit into from
Mar 15, 2022
Merged

Refactor layout #14

merged 1 commit into from
Mar 15, 2022

Conversation

Jake-Shadle
Copy link
Collaborator

Part 1 of splitting #13.

This refactors the layout of the crate and cleans up imports a bit, but no functional changes.

  • Puts the linux/android specific code into a linux submodule that is reexported from the root so the outward API doesn't really change, it will just make adding additional target platforms cleaner
  • Renamed LinuxPtraceDumper to PtraceDumper, the naming was inherited from breakpad but doesn't make much sense since there is only one ptrace implementation, and even if a future one was added eg BSD, it would either be its own separate one, or else a specialization of the linux one
  • There are quite a few target specific parts of this code requiring relatively complicated cfg expressions, so I added cfg-if to make them cleaner and easier to read
  • A lot of the imports where massive with lots of duplication, so I collapsed most of them
  • Cleaned up the names of nested modules as they were needlessly prefixed with the parent module name
  • Removed all of the empty mips/ppc/sparc implementations

One breaking change I made was to move to the 2021 edition which is 5 months old at this point, but I can revert that if it's not wanted, the only change that this really enabled was to remove all of the std::convert::TryInto imports since that is part of the prelude in the 2021 edition.

@msirringhaus
Copy link
Collaborator

I'm not a huge fan of use super::*, but I also don't care enough to make you change it back :-D
Thanks for the cleanup. Bumping to edition 2021 is fine.

@msirringhaus msirringhaus merged commit 9a75bf5 into rust-minidump:main Mar 15, 2022
@Jake-Shadle
Copy link
Collaborator Author

Yah I'm not a fan of it either particularly, it was just the lazy option for sections since they shared so many imports between the different submodules.

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