🔧 chore(Cargo): configure project settings and lints
- add clippy lints for format args and unnecessary semicolon warnings - allow rust dead-code lint temporarily for development phase - specify library and binary paths for project structure
This commit is contained in:
committed by
Jeremiah Russell
parent
66a0fc7229
commit
b614c87408
19
src/lib.rs
19
src/lib.rs
@@ -1,14 +1,5 @@
|
||||
pub fn add(left: u64, right: u64) -> u64 {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![warn(missing_docs)]
|
||||
#![cfg_attr(docsrs, feature(rustdoc_missing_doc_code_examples))]
|
||||
#![cfg_attr(docsrs, warn(rustdoc::invalid_codeblock_attributes))]
|
||||
#![doc = include_str!("../docs/lib.md")]
|
||||
|
||||
Reference in New Issue
Block a user