You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-04 13:50:28 +02:00
Be more consistent about tests vs. main (#2644)
The content slides all use `fn main`, with the exception of the testing segment. But with this change, where it makes sense exercises use tests instead, and not both tests and `fn main`. A small change in `book.js` supports running tests when a code sample does not have `fn main` but does have `#[test]`, so these work naturally. Fixes #1581.
This commit is contained in:
committed by
GitHub
parent
699c5137c7
commit
44a79741ff
@ -51,7 +51,7 @@ The [Nomicon] also has a very useful chapter about FFI.
|
||||
Copy the code below to <https://play.rust-lang.org/> and fill in the missing
|
||||
functions and methods:
|
||||
|
||||
```rust,should_panic
|
||||
```rust,should_panic,editable
|
||||
// TODO: remove this when you're done with your implementation.
|
||||
#![allow(unused_imports, unused_variables, dead_code)]
|
||||
|
||||
|
Reference in New Issue
Block a user