summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one')
-rw-r--r--src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one/Cargo.toml8
-rw-r--r--src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one/src/lib.rs8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one/Cargo.toml b/src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one/Cargo.toml
new file mode 100644
index 000000000..900018470
--- /dev/null
+++ b/src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "add_one"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one/src/lib.rs b/src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one/src/lib.rs
new file mode 100644
index 000000000..1b4a90c93
--- /dev/null
+++ b/src/doc/book/listings/ch14-more-about-cargo/output-only-02-add-one/add/add_one/src/lib.rs
@@ -0,0 +1,8 @@
+#[cfg(test)]
+mod tests {
+ #[test]
+ fn it_works() {
+ let result = 2 + 2;
+ assert_eq!(result, 4);
+ }
+}