From b0f001e447e7c0062e007c623f9558238ae59fc6 Mon Sep 17 00:00:00 2001 From: Charles Lechasseur Date: Sat, 21 Oct 2023 12:25:05 -0400 Subject: [PATCH] chore: add test-output crate --- Cargo.lock | 7 +++++++ Cargo.toml | 9 +++++++++ src/main.rs | 9 +++++++++ 3 files changed, 25 insertions(+) create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..533ea91 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "rust-template-output" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..9f01c98 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "rust-template-output" +version = "0.1.0" +edition = "2021" + +[features] +test_feature_1 = [] + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e1bc5a8 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,9 @@ +fn main() { + println!("Hello, world!"); + + if cfg!(feature = "test_feature_1") { + println!("test-feature-1 is enabled"); + } else { + println!("test-feature-1 is disabled"); + } +}