From bcb015a6228dcc5c5b3c817fed9de605ad019233 Mon Sep 17 00:00:00 2001 From: Nuke Date: Tue, 17 Oct 2023 11:47:31 -0600 Subject: [PATCH] fmt, allow unused --- src/b_multiple_choice.rs | 4 ++-- src/k_macros.rs | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/b_multiple_choice.rs b/src/b_multiple_choice.rs index 8f9f24d..51d1aab 100644 --- a/src/b_multiple_choice.rs +++ b/src/b_multiple_choice.rs @@ -8,8 +8,8 @@ //! code snippets**. You may only trace them manually in your head or on paper. Pretend that this //! portion of the exam is being administered on paper, and no computer is available at all. //! -//! To enable us to auto-grade your answer, you implement the code that returns the `char` representing -//! your answer. +//! To enable us to auto-grade your answer, you implement the code that returns the `char` +//! representing your answer. //! //! If you would like a rendered and styled version of these questions simply build an open the Rust //! Docs for this module, and navigate the the multiple choice question module docs by the command: diff --git a/src/k_macros.rs b/src/k_macros.rs index c3c28f4..33c32dc 100644 --- a/src/k_macros.rs +++ b/src/k_macros.rs @@ -87,10 +87,11 @@ mod tests { assert_eq!(macro_generated, expected); } + #[allow(unused_imports)] #[test] fn impl_get() { use super::Get; - + impl_get!( // should generate `struct Foo` that implements `Get` Foo: u32 = 10; @@ -104,7 +105,10 @@ mod tests { // assert_eq!(Foo::get(), 10); // assert_eq!(Bar::get(), 42); // assert_eq!(Baz::get(), 21); - assert_eq!(true, false, "Make sure to remove this line and uncomment the tests above"); + assert_eq!( + true, false, + "Make sure to remove this line and uncomment the tests above" + ); // As an extra, ungraded, challenge, try to make this work. // This is not part of the main problem because it requires the nightly compiler.