aboutsummaryrefslogtreecommitdiff
path: root/macros/src/fn_trait.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-09-26 19:46:15 +0200
committerHampusM <hampus@hampusmat.com>2023-09-26 19:46:15 +0200
commitfe4255d765d24b3a62094a02d35077a1022887bb (patch)
treeee47f81339f569ec3b42d56778c9be514cb80ae4 /macros/src/fn_trait.rs
parent267ab1dc45c7e2cb68d8238c04376a258dcf61c9 (diff)
test: make unit tests not return Result
Diffstat (limited to 'macros/src/fn_trait.rs')
-rw-r--r--macros/src/fn_trait.rs9
1 files changed, 3 insertions, 6 deletions
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<dyn Error>>
+ fn can_parse_fn_trait()
{
assert_eq!(
parse2::<FnTrait>(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]