From 0c6ada833b24a3d67936614aa4c9c5618337c9ec Mon Sep 17 00:00:00 2001 From: CYBAI Date: Fri, 26 Jan 2018 01:08:22 +0800 Subject: [PATCH] Use specific assertion for net hsts tests --- components/net/tests/hsts.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/net/tests/hsts.rs b/components/net/tests/hsts.rs index eca9d2a8d27..bd035a1616e 100644 --- a/components/net/tests/hsts.rs +++ b/components/net/tests/hsts.rs @@ -92,7 +92,7 @@ fn test_push_entry_with_0_max_age_evicts_entry_from_list() { list.push(HstsEntry::new("mozilla.org".to_owned(), IncludeSubdomains::NotIncluded, Some(0)).unwrap()); - assert!(list.is_host_secure("mozilla.org") == false) + assert_eq!(list.is_host_secure("mozilla.org"), false) } #[test] @@ -107,7 +107,7 @@ fn test_push_entry_to_hsts_list_should_not_add_subdomains_whose_superdomain_is_a list.push(HstsEntry::new("servo.mozilla.org".to_owned(), IncludeSubdomains::NotIncluded, None).unwrap()); - assert!(list.entries_map.get("mozilla.org").unwrap().len() == 1) + assert_eq!(list.entries_map.get("mozilla.org").unwrap().len(), 1) } #[test] @@ -139,7 +139,7 @@ fn test_push_entry_to_hsts_list_should_not_create_duplicate_entry() { list.push(HstsEntry::new("mozilla.org".to_owned(), IncludeSubdomains::NotIncluded, None).unwrap()); - assert!(list.entries_map.get("mozilla.org").unwrap().len() == 1) + assert_eq!(list.entries_map.get("mozilla.org").unwrap().len(), 1) } #[test]