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

Replace tempdir with tempfile #2760

Merged
merged 3 commits into from
Aug 26, 2024
Merged

Replace tempdir with tempfile #2760

merged 3 commits into from
Aug 26, 2024

Conversation

lann
Copy link
Collaborator

@lann lann commented Aug 26, 2024

tempdir is abandoned

@lann lann requested a review from kate-goldenring August 26, 2024 17:37
fn run(
self,
trigger_app: TriggerApp<Self>,
) -> impl Future<Output = anyhow::Result<()>> + Send;
fn run(self, trigger_app: TriggerApp<Self>) -> impl Future<Output = anyhow::Result<()>> + Send;
Copy link
Collaborator Author

@lann lann Aug 26, 2024

Choose a reason for hiding this comment

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

Sneaky unrelated rustfmts 🕵️

lann added 3 commits August 26, 2024 13:46
Signed-off-by: Lann Martin <[email protected]>
Signed-off-by: Lann Martin <[email protected]>
@@ -312,7 +312,7 @@ impl<T: Trigger> TriggerAppBuilder<T> {
let use_gpu = true;
let state_dir = match options.state_dir {
// Make sure `--state-dir=""` unsets the state dir
Some(s) if s.trim().is_empty() => None,
Some("") => None,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sneaky lint fix...

Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't equivalent, no? Some(" ") would match the first but not the second.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah sorry I blindly obeyed clippy. That said, --state-dir " " seems more likely to be an accident...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Though it now occurs to me that its perfectly valid to create a directory named " "...

Copy link
Contributor

@kate-goldenring kate-goldenring left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@lann lann merged commit 566a44c into fermyon:factors Aug 26, 2024
1 check passed
@lann lann deleted the tempdir-file branch August 26, 2024 17:59
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