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

courses/rust/projects/project-4/README.md Updates signature of Threadpool::new #406

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kkwteh
Copy link

@kkwteh kkwteh commented Jan 6, 2022

This update is needed, because the current signature as given in the README is rejected by the compile with the message:

the size for values of type `(dyn ThreadPool + 'static)` cannot be known at compilation time
the trait `Sized` is not implemented for `(dyn ThreadPool + 'static)`rustcE0277
result.rs(503, 17): required by a bound in `std::result::Result`

What is changed and how it works?

I changed the return value from Result<ThreadPool> to Result<Self> where Self: Sized, which matches the trait definition in the code

Check List

This update is needed, because the current signature is rejected by the compile with the message:
```
the size for values of type `(dyn ThreadPool + 'static)` cannot be known at compilation time
the trait `Sized` is not implemented for `(dyn ThreadPool + 'static)`rustcE0277
result.rs(503, 17): required by a bound in `std::result::Result`
```
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.

None yet

1 participant