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

Make TaskBuilder methods return Self again so we can use the builder pattern. #6399

Closed
metajack opened this issue May 10, 2013 · 15 comments
Closed
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone

Comments

@metajack
Copy link
Contributor

Specifically sched_mode() now returns () instead of the builder. This broke servo code using the following pattern:

task::task().sched_mode(Foo).spawn {
    ....
}

EDIT(bblum): All methods seem to return (). They should all return Self except for the spawn methods.

@metajack
Copy link
Contributor Author

nominating for backwards compatible

@graydon
Copy link
Contributor

graydon commented May 16, 2013

accepted for backwards-compatible milestone

@nikomatsakis
Copy link
Contributor

Blocked on #5967

@nikomatsakis
Copy link
Contributor

(Allowing rvalues to be mutably borrowed)

@sanxiyn
Copy link
Member

sanxiyn commented May 27, 2013

This is unblocked?

@bblum
Copy link
Contributor

bblum commented Jun 28, 2013

Looks like it is.

@pnkfelix
Copy link
Member

visited for bug triage, email 2013-08-19.

It sounds from the comments like someone should take a shot at doing this, since #5967 is now fixed.

I'm looking into it. Niko says it may still not work well; "you'll find you can't chain more than one or two calls..."

@nikomatsakis
Copy link
Contributor

To clarify, this is due to issue #3511, which I hope to address soon.

@pnkfelix
Copy link
Member

(I have abandoned PR #8708; others are free to resurrect it if they like.)

@lilac
Copy link
Contributor

lilac commented Jan 18, 2014

Is this unblocked by recent progress in #3511 ?

@pnkfelix
Copy link
Member

@lilac I remain unclear as to whether the actual goal here is to implement the multable-builder pattern or the immutable one; see the dialogue on PR #8708

@alexcrichton @metajack can you shed some light on this question? (Not that I dont trust bblum's statements, but I figure I'd rather get a thumbs-up from someone within the current core team.)

@alexcrichton
Copy link
Member

I would guess that this is unblocked, but there's only one way to find out!

@pnkfelix
Copy link
Member

@alexcrichton sorry, by "shed some light on this question", I meant this question:

  • is the actual goal here is to implement the mutable-builder pattern or the immutable one?

@alexcrichton
Copy link
Member

I don't particularly have an opinion one way or another, I wasn't around for the time that this looked like it existed. I'm not sure how commonly this is used and whether we still want to switch.

@alexcrichton
Copy link
Member

Sorry that doesn't really shed any more light than before :(

@bors bors closed this as completed in 93a2ee8 Feb 18, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 21, 2022
New lint `is_digit_ascii_radix`

Closes rust-lang#6399

changelog: Added [`is_digit_ascii_radix`]: recommend `is_ascii_digit()` or `is_ascii_hexdigit()` in place of `is_digit(10)` and `is_digit(16)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
8 participants