Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really love that you can (have?) put tests in the same file as the threadpool implementation. I think I will start doing this myself...


Rust convention is to put unit tests in the same file. I like it too :)

Also, doc comments run as tests too, so https://github.com/rust-lang/threadpool/blob/master/src/lib.... will actually get executed as a test.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: