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: how to build path in reader #13

Merged

Conversation

Konippi
Copy link
Contributor

@Konippi Konippi commented Aug 1, 2024

Improve and Simplify Path Construction Logic

This PR enhances and simplifies the path construction logic in the build_path function.

  • Utilized unwrap_or_default() for concise fallback handling when the environment variable is not present.
  • Employed the join method for efficient concatenation of the base directory and filename.

Copy link
Collaborator

@fursich fursich left a comment

Choose a reason for hiding this comment

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

@Konippi thanks for your contribution!

As for CI, I drafted up another PR to fix it (sorry for that).
Once it is getting merged, please rebase the latest master, and it should be fine.
Thank you for your patience in advance :)

.map(PathBuf::from)
.unwrap_or_default()
.join(base_dir)
.join(filename);
Copy link
Collaborator

Choose a reason for hiding this comment

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

that's really neat ❤️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand.
Looking forward to having your pr merged!

Copy link
Member

@kenkoooo kenkoooo left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution. Since we’ve fixed the CI, the tests should pass. I’ll go ahead and merge it.

@kenkoooo kenkoooo merged commit a7daf01 into estie-inc:main Aug 14, 2024
0 of 6 checks passed
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.

3 participants