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

refactor: remove lib and move some things around #1477

Merged
merged 11 commits into from
Jun 5, 2024

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Jun 5, 2024

Description

A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:

A loooooong time ago (wow, it's been 4 years apparently...), I made the brilliant (/s) decision to use both lib.rs and main.rs because I was trying to add tests in the tests folder that needed private access to some functions in the src - and at the time, the only way I could think of doing so was exposing bottom as a library and a binary.

This isn't necessarily bad, but for my use case, it's pretty unnecessary nowadays (since I've moved all my tests back into the source files) and adds complexity in looking for certain things, so it's high time we move things around and remove lib.rs. I also took the time to clean up some weird code I spotted along the way.

Issue

If applicable, what issue does this address?

Closes: #

Testing

If relevant, please state how this was tested. All changes must be tested to work:

If this is a code change, please also indicate which platforms were tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 40.59701% with 199 lines in your changes missing coverage. Please review.

Project coverage is 40.97%. Comparing base (7aa379a) to head (9ae9322).

Files Patch % Lines
src/event.rs 14.77% 75 Missing ⚠️
src/main.rs 59.87% 63 Missing ⚠️
src/app.rs 31.14% 42 Missing ⚠️
src/options.rs 35.71% 18 Missing ⚠️
src/app/process_killer.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1477      +/-   ##
==========================================
+ Coverage   40.95%   40.97%   +0.01%     
==========================================
  Files          99       99              
  Lines       17462    17459       -3     
==========================================
+ Hits         7152     7153       +1     
+ Misses      10310    10306       -4     
Flag Coverage Δ
macos-12 36.34% <4.77%> (+0.01%) ⬆️
ubuntu-latest 42.92% <40.59%> (+0.01%) ⬆️
windows-2019 36.47% <4.79%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ClementTsang ClementTsang force-pushed the separate_bin_and_lib branch 2 times, most recently from ebcee16 to 8989aa4 Compare June 5, 2024 05:11
@ClementTsang ClementTsang merged commit 8885910 into main Jun 5, 2024
36 checks passed
@ClementTsang ClementTsang deleted the separate_bin_and_lib branch June 5, 2024 06:00
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.

1 participant