Skip to content

Commit 04c9805

Browse files
committed
refactor(tests): remove unnecessary converting to string
1 parent 07da81c commit 04c9805

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/uri/authority.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,10 @@ mod tests {
660660
#[test]
661661
fn compares_with_a_string() {
662662
let authority: Authority = "def.com".parse().unwrap();
663-
assert!(authority < "ghi.com".to_string());
664-
assert!("ghi.com".to_string() > authority);
665-
assert!(authority > "abc.com".to_string());
666-
assert!("abc.com".to_string() < authority);
663+
assert!(authority < "ghi.com");
664+
assert!("ghi.com" > authority);
665+
assert!(authority > "abc.com");
666+
assert!("abc.com" < authority);
667667
}
668668

669669
#[test]

src/uri/path.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,10 @@ mod tests {
620620
#[test]
621621
fn compares_with_a_string() {
622622
let path_and_query: PathAndQuery = "/b/world&foo=bar".parse().unwrap();
623-
assert!(path_and_query < "/c/world&foo=bar".to_string());
624-
assert!("/c/world&foo=bar".to_string() > path_and_query);
625-
assert!(path_and_query > "/a/world&foo=bar".to_string());
626-
assert!("/a/world&foo=bar".to_string() < path_and_query);
623+
assert!(path_and_query < "/c/world&foo=bar");
624+
assert!("/c/world&foo=bar" > path_and_query);
625+
assert!(path_and_query > "/a/world&foo=bar");
626+
assert!("/a/world&foo=bar" < path_and_query);
627627
}
628628

629629
#[test]

0 commit comments

Comments
 (0)