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

refac: use Lazy to optimize env::current_dir repeated call #261

Merged
merged 2 commits into from
Aug 12, 2022

Conversation

marcospb19
Copy link
Member

@marcospb19 marcospb19 commented Jun 8, 2022

env::current_dir is repeatedly called when presenting
the path to the user in the strip_cur_dir function.

This will effectively change logged paths if we cd into some other directory, possibly changing from:

decompressing at file.txt to decompressing at dir1/dir2/file.txt

@marcospb19 marcospb19 requested a review from vrmiguel June 8, 2022 20:55
@marcospb19 marcospb19 force-pushed the refac/optimize-current-dir-call branch from 9a44001 to 66d7339 Compare August 12, 2022 16:05
@marcospb19 marcospb19 merged commit 72295d8 into main Aug 12, 2022
@marcospb19 marcospb19 deleted the refac/optimize-current-dir-call branch August 12, 2022 16:06
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