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: clean up rtxrc editing #160

Merged
merged 1 commit into from
Feb 21, 2023
Merged

refactor: clean up rtxrc editing #160

merged 1 commit into from
Feb 21, 2023

Conversation

jdx
Copy link
Owner

@jdx jdx commented Feb 21, 2023

This uses a OnceCell to help with creating the editable document and memoizing it. It also uses a Mutex which reduces the need to making things mutable. I was using get_edit() and get_or_init_edit() as a memoizeable and non-memoizable methods, this makes it so get_edit() is memoized and doesn't require a mutable reference to Rtxrc

cc @roele

This uses a OnceCell to help with creating the editable document and
memoizing it. It also uses a Mutex which reduces the need to making things mutable
@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Base: 82.00% // Head: 81.95% // Decreases project coverage by -0.06% ⚠️

Coverage data is based on head (56361a9) compared to base (fcb74d7).
Patch coverage: 85.71% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #160      +/-   ##
==========================================
- Coverage   82.00%   81.95%   -0.06%     
==========================================
  Files          89       89              
  Lines        2845     2848       +3     
==========================================
+ Hits         2333     2334       +1     
- Misses        512      514       +2     
Impacted Files Coverage Δ
src/config/config_file/rtxrc.rs 77.83% <81.48%> (-0.78%) ⬇️
src/cli/alias/set.rs 100.00% <100.00%> (ø)
src/cli/alias/unset.rs 100.00% <100.00%> (ø)
src/cli/settings/set.rs 81.81% <100.00%> (ø)
src/cli/settings/unset.rs 100.00% <100.00%> (ø)
src/cli/plugins/install.rs 97.67% <0.00%> (+0.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jdx jdx merged commit dd47ef3 into main Feb 21, 2023
@jdx jdx deleted the refactor-settings branch February 21, 2023 03:52
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

1 participant