From fe4255d765d24b3a62094a02d35077a1022887bb Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 26 Sep 2023 19:46:15 +0200 Subject: test: make unit tests not return Result --- macros/src/fn_trait.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'macros/src/fn_trait.rs') diff --git a/macros/src/fn_trait.rs b/macros/src/fn_trait.rs index 31d7d95..0858cca 100644 --- a/macros/src/fn_trait.rs +++ b/macros/src/fn_trait.rs @@ -88,8 +88,6 @@ impl ToTokens for FnTrait #[cfg(test)] mod tests { - use std::error::Error; - use quote::{format_ident, quote}; use syn::token::{Dyn, RArrow}; use syn::{parse2, PathSegment}; @@ -98,12 +96,13 @@ mod tests use crate::test_utils; #[test] - fn can_parse_fn_trait() -> Result<(), Box> + fn can_parse_fn_trait() { assert_eq!( parse2::(quote! { dyn Fn(String, u32) -> Handle - })?, + }) + .unwrap(), FnTrait { dyn_token: Dyn::default(), trait_ident: format_ident!("Fn"), @@ -128,8 +127,6 @@ mod tests Fn(u32) -> Handle }) .is_err()); - - Ok(()) } #[test] -- cgit v1.2.3-18-g5258