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 bxt_play_folder #53

Merged
merged 1 commit into from
Nov 23, 2022
Merged

Add bxt_play_folder #53

merged 1 commit into from
Nov 23, 2022

Conversation

khanghugo
Copy link
Contributor

"wildcard" is not really wildcard as it won't attempt to match things like what it should, more meant for folder.

enumerate() pretty much does nothing but I think it is better to keep it there to log something for the tuple.

path.file_stem()
.and_then(OsStr::to_str)
.filter(|name| name.starts_with(&name_prefix))
.and_then(|name| name[name_prefix.len()..].parse::<usize>().ok())
Copy link
Owner

Choose a reason for hiding this comment

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

Please don't add it into this function. The expression is already way too complicated, the last thing it needs is more special cases. Even just writing out a separate function with the same functionality would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The find_demos() now has one for folder as requested 👍 I still have play_folder depending on play_run as it would be easier to maintain, I think.

Too lazy to split into commits... Also this really needs lifting the 15
character limitation, I will do that in another commit.
@YaLTeR YaLTeR merged commit 5dc7f95 into YaLTeR:master Nov 23, 2022
@YaLTeR
Copy link
Owner

YaLTeR commented Nov 23, 2022

Thanks! I'll deal with the filename limitation later because I'll need to check what the engine functions do again for that. For now I think it's decent enough, if you rename the folder to a single letter, you have 13 letters left for demo names.

@khanghugo
Copy link
Contributor Author

🐐

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.

2 participants