Skip to content

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.

1 participant