From a2ff502bffe10f9ba15edeab2ab81f5b4e007cc0 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 19 Apr 2016 18:57:14 -0400 Subject: is_alias_in_file_finds_a_match: Change `to_string` to `to_owned` Saw this pattern in the Rust book chapter Error Handling (http://doc.rust-lang.org/stable/book/error-handling.html#composing-option-and-result). Not sure if this is right but it seems better and more clearly evokes our intentions, so use `to_owned` here. --- src/tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/tests.rs b/src/tests.rs index d59fcc6..29723cd 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -45,9 +45,9 @@ fn new_alias_with_special_characters() { fn is_alias_in_file_finds_a_match() { is_alias_in_file( &Alias { - alias: "farnsworth-hubert".to_string(), - name: "Hubert Farnsworth".to_string(), - email: "".to_string() + alias: "farnsworth-hubert".to_owned(), + name: "Hubert Farnsworth".to_owned(), + email: "".to_owned() }, "./testdata/aliases" ); -- cgit v1.2.3