diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2014-11-27 19:52:53 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2014-12-06 23:53:02 -0500 |
| commit | 93e99b55f8ed8d9c601c4ac176ac06dc88953543 (patch) | |
| tree | c58fb88779d6648d70fcd8bc7b3ee3fc2492b6ad /src/libsyntax/parse/lexer | |
| parent | c2da923fc95e29424a7dac1505d6e8ea50c49b9f (diff) | |
| download | rust-93e99b55f8ed8d9c601c4ac176ac06dc88953543.tar.gz rust-93e99b55f8ed8d9c601c4ac176ac06dc88953543.zip | |
libsyntax: remove unnecessary `to_string()` calls
Diffstat (limited to 'src/libsyntax/parse/lexer')
| -rw-r--r-- | src/libsyntax/parse/lexer/comments.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs index f9877d937ca..aeec6ee13fd 100644 --- a/src/libsyntax/parse/lexer/comments.rs +++ b/src/libsyntax/parse/lexer/comments.rs @@ -389,41 +389,41 @@ mod test { #[test] fn test_block_doc_comment_1() { let comment = "/**\n * Test \n ** Test\n * Test\n*/"; let stripped = strip_doc_comment_decoration(comment); - assert_eq!(stripped, " Test \n* Test\n Test".to_string()); + assert_eq!(stripped, " Test \n* Test\n Test"); } #[test] fn test_block_doc_comment_2() { let comment = "/**\n * Test\n * Test\n*/"; let stripped = strip_doc_comment_decoration(comment); - assert_eq!(stripped, " Test\n Test".to_string()); + assert_eq!(stripped, " Test\n Test"); } #[test] fn test_block_doc_comment_3() { let comment = "/**\n let a: *int;\n *a = 5;\n*/"; let stripped = strip_doc_comment_decoration(comment); - assert_eq!(stripped, " let a: *int;\n *a = 5;".to_string()); + assert_eq!(stripped, " let a: *int;\n *a = 5;"); } #[test] fn test_block_doc_comment_4() { let comment = "/*******************\n test\n *********************/"; let stripped = strip_doc_comment_decoration(comment); - assert_eq!(stripped, " test".to_string()); + assert_eq!(stripped, " test"); } #[test] fn test_line_doc_comment() { let stripped = strip_doc_comment_decoration("/// test"); - assert_eq!(stripped, " test".to_string()); + assert_eq!(stripped, " test"); let stripped = strip_doc_comment_decoration("///! test"); - assert_eq!(stripped, " test".to_string()); + assert_eq!(stripped, " test"); let stripped = strip_doc_comment_decoration("// test"); - assert_eq!(stripped, " test".to_string()); + assert_eq!(stripped, " test"); let stripped = strip_doc_comment_decoration("// test"); - assert_eq!(stripped, " test".to_string()); + assert_eq!(stripped, " test"); let stripped = strip_doc_comment_decoration("///test"); - assert_eq!(stripped, "test".to_string()); + assert_eq!(stripped, "test"); let stripped = strip_doc_comment_decoration("///!test"); - assert_eq!(stripped, "test".to_string()); + assert_eq!(stripped, "test"); let stripped = strip_doc_comment_decoration("//test"); - assert_eq!(stripped, "test".to_string()); + assert_eq!(stripped, "test"); } } |
