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

Add stored parent_dir builder parameter #308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 9, 2024

  1. Add stored parent_dir builder parameter

    I have a usecase where it's useful to be able to pass `Builder`s around
    and have them remember the parent directory to create files in, just like they
    remember the filename prefix and suffix.
    
    So, add a new `parent_dir` API to do just that.
    
    Note that we still call env::temp_dir even when the result won't be used. Using
    `self.dir.unwrap_or_else(|| temp_dir())` doesn't work because `tempdir_in`
    doesn't accept an owned `PathBuf`. If anyone prefers, we can easily get rid of
    this pointless call by just having an explicit `match` instead of `unwrap_or`,
    but it's a bit more verbose. No strong feelings either way from my side.
    bjackman committed Nov 9, 2024
    Configuration menu
    Copy the full SHA
    21e0505 View commit details
    Browse the repository at this point in the history