initial commit
This commit is contained in:
10
exercises/02_basic_calculator/00_intro/Cargo.toml
Normal file
10
exercises/02_basic_calculator/00_intro/Cargo.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "intro_01"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lints.rust]
|
||||
# We silence dead code warnings for the time being in order to reduce
|
||||
# compiler noise.
|
||||
# We'll re-enable them again once we explain how visibility works in Rust.
|
||||
dead_code = "allow"
|
||||
14
exercises/02_basic_calculator/00_intro/src/lib.rs
Normal file
14
exercises/02_basic_calculator/00_intro/src/lib.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
fn intro() -> &'static str {
|
||||
// TODO: fix me 👇
|
||||
"I'm ready to __!"
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::intro;
|
||||
|
||||
#[test]
|
||||
fn test_intro() {
|
||||
assert_eq!(intro(), "I'm ready to build a calculator in Rust!");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user