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

Fix foreachprogress returning early #249

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

brendanjohnharris
Copy link
Contributor

In the current version, foreachprogress exits without doing or showing a thing.
It looks like a stray return is the culprit?
This PR deletes it 🕺

As a simple example:

x = zeros(10)
foreachprogress(eachindex(x); description = "Working...") do i
    @info i
    x[i] = 1
    sleep(0.1)
end
sum(x)

Current behavior: prints nothing, returns 0
New behavior: prints @info and ProgressBar, returns 10

@FedeClaudi
Copy link
Owner

That looks good, thanks for the fix.

@FedeClaudi FedeClaudi merged commit 9ae26d2 into FedeClaudi:master Apr 24, 2024
2 of 7 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.

2 participants