-
Notifications
You must be signed in to change notification settings - Fork 1.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
Move thread::spawn
to separate function
#1020
Conversation
This might make it clearer why the thread cannot borrow from the string.
Yes, I think that's worthwhile. Does the playground run |
The full Playground supports running tests: the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error[E0601]: `main` function not found in crate `playground`
--> src/main.rs:12:2
|
12 | }
| ^ consider adding a `main` function to `src/main.rs`
so looks like #[test]
won't work..
Yeah, unit tests only work in the full playground. The embedded playground is not smart enough to detect the unit tests. It would be nice to extend it to be as clever as the full playground. |
This might make it clearer why the thread cannot borrow from the string.
This might make it clearer why the thread cannot borrow from the string.
@djmitche, do you think this is worth the extra vertical space?