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 typo #244

Closed
wants to merge 1 commit into from
Closed

fix typo #244

wants to merge 1 commit into from

Conversation

redzovic
Copy link

No description provided.

@compiler-errors
Copy link
Member

this is not a typo. &mut Self is a type.

@redzovic
Copy link
Author

You haven't even read it have you? It says "...self type is no longer &mut Self" in the given example it was never &mut Self it was &mut self. The SimpleFuture trait is defined as follows:

trait SimpleFuture {
    type Output;
    fn poll(&mut self, wake: fn()) -> Poll<Self::Output>;
}```

@redzovic
Copy link
Author

@compiler-errors either remove "no longer" or change it to &mut self. Currently, it is just ambiguous.

@compiler-errors
Copy link
Member

You haven't even read it have you?

of course i read it :) &mut self is shorthand for self: &mut Self, and &mut self is not a type.

I'm not certain i agree that this is ambiguous. At best this could be rephrased, but I don't think it really needs it. Feel free to suggest alternatives.

@redzovic
Copy link
Author

Okay my bad you are right 😅
Seems like I wasn't the one who has read it properly.

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