create super strict rust config
This commit is contained in:
commit
d56ebb7e16
36 changed files with 2969 additions and 0 deletions
10
crates/the-lib/Cargo.toml
Normal file
10
crates/the-lib/Cargo.toml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[package]
|
||||
name = "the-lib"
|
||||
version = "0.0.0"
|
||||
edition = "2024"
|
||||
license = "EUPL-1.2"
|
||||
|
||||
[dependencies]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
18
crates/the-lib/src/lib.rs
Normal file
18
crates/the-lib/src/lib.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#[must_use]
|
||||
pub const 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue