January 2019
Intermediate to advanced
520 pages
14h 32m
English
As you saw, it's possible to allow or deny some warnings for lints, but there are some attributes that can be used to make your code cleaner:
#![deny( bare_trait_objects, dead_code,)]#![warn( missing_debug_implementations, missing_docs, while_true, unreachable_pub,)]#![cfg_attr( feature = "cargo-clippy", deny( clippy::doc_markdown, ),)]
This is an example of stricter requirements for a code. The compiler deny unused code of missing docs, will require loop instead of while true and check all published types have to be reachable. Also, we completely deny using variable names in markdown docs without ticks. You can add whatever requirements you need to your project.
Also, the preceding requirements force us to use ...
Read now
Unlock full access