From 4339537ec99e0ff1d1534aedbb88a6120faffda4 Mon Sep 17 00:00:00 2001 From: Gregor Reitzenstein Date: Wed, 28 Oct 2020 23:25:59 +0100 Subject: [PATCH] Make compile with tests --- src/db/access.rs | 3 ++- src/db/user.rs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/db/access.rs b/src/db/access.rs index 100b4ae..9fc654f 100644 --- a/src/db/access.rs +++ b/src/db/access.rs @@ -357,6 +357,7 @@ mod tests { #[test] fn permission_ord_test() { - assert!(PermissionBuf::from_string("bffh.perm") > PermissionBuf::from_string("bffh.perm.sub")); + assert!(PermissionBuf::from_string("bffh.perm".to_string()) + > PermissionBuf::from_string("bffh.perm.sub".to_string())); } } diff --git a/src/db/user.rs b/src/db/user.rs index 3986c8e..16f7fc9 100644 --- a/src/db/user.rs +++ b/src/db/user.rs @@ -68,11 +68,11 @@ mod tests { let location = "testloc".to_string(); assert_eq!("testuser", - format!("{}", UserIdentifier::new(uid, None, None))); + format!("{}", UserIdentifier::new(uid.clone(), None, None))); assert_eq!("testuser+testsuid", - format!("{}", UserIdentifier::new(uid, Some(suid), None))); + format!("{}", UserIdentifier::new(uid.clone(), Some(suid.clone()), None))); assert_eq!("testuser+testsuid", - format!("{}", UserIdentifier::new(uid, Some(suid), None))); + format!("{}", UserIdentifier::new(uid.clone(), Some(suid.clone()), None))); assert_eq!("testuser+testsuid@testloc", format!("{}", UserIdentifier::new(uid, Some(suid), Some(location)))); }