From 3fffed31195787537396a767768fed40a5db64e0 Mon Sep 17 00:00:00 2001 From: "Jonathan A. McCormick, Jr." <67705789+JonathanMcCormickJr@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:46:22 -0600 Subject: [PATCH] Continuing effort to test Clippy in a way that makes sense. --- src/users.rs | 12 ------------ tests/clippy.rs | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 tests/clippy.rs diff --git a/src/users.rs b/src/users.rs index f29ed21..10acd9b 100644 --- a/src/users.rs +++ b/src/users.rs @@ -91,15 +91,3 @@ pub struct User { pub second_factor: SecondFactor, } - -pub struct TestClippy { - pub test: String, -} - -impl TestClippy { - pub fn new(test: String) -> Self { - return Self { - test, - }; - } -} \ No newline at end of file diff --git a/tests/clippy.rs b/tests/clippy.rs new file mode 100644 index 0000000..6025196 --- /dev/null +++ b/tests/clippy.rs @@ -0,0 +1,16 @@ +// tests/clippy.rs + +#![forbid(unsafe_code)] + + +/* +#[test] +#[allow(dead_code)] +#[should_panic] +fn myfunc() -> i32 { + let x: i32 = 1; + return x; +} + +//CONTINUE HERE +*/ \ No newline at end of file