-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove Iterator::advance #15492
Comments
|
Yes, this should go. @P1start no, both short-circuit. They are identical, the only difference is fn advance(&mut self, f: |A| -> bool) -> bool {
loop {
match self.next() {
Some(x) => {
if !f(x) { return false; }
}
None => { return true; }
}
}
}
fn all(&mut self, f: |A| -> bool) -> bool {
for x in *self { if !f(x) { return false; } }
true
} |
I actually had I branch I was working on that I kinda forgot about (https://github.com/luqmana/rust/commits/die-advance-die) I'll update it and push it out. |
@luqmana cool! It looks though as you can use |
extend check.overrideCommand and buildScripts.overrideCommand docs Extend check.overrideCommand and buildScripts.overrideCommand docs regarding invocation strategy and location. However something still seems a bit odd -- the docs for `invocationStrategy`/`invocationLocation` talk about "workspaces", but the setting that controls which workspaces are considered is called `linkedProjects`. Is a project the same as a workspace here or is there some subtle difference?
Unless I'm confused,
Iterator::advance
is actually exactly equivalent toIterator::all
.We thus have two good reasons to remove it, 1) It's a legacy protocol 2) It's got an exact replacement in
.all()
The text was updated successfully, but these errors were encountered: