@@ -95,17 +95,17 @@ fn bin_already_exists(explicit: bool, rellocation: &str, needs_bin_section: bool
9595 File :: open ( & sourcefile_path) . unwrap ( ) . read_to_end ( & mut new_content) . unwrap ( ) ;
9696 assert_eq ! ( Vec :: from( content as & [ u8 ] ) , new_content) ;
9797
98- let mut cargo_content = String :: new ( ) ;
98+ let mut cargo_content = String :: new ( ) ;
9999 File :: open ( & paths:: root ( ) . join ( "foo/Cargo.toml" ) ) . unwrap ( )
100100 . read_to_string ( & mut cargo_content) . unwrap ( ) ;
101- // Check that Cargo.toml has a bin section pointing to the correct location (if needed)
102- if needs_bin_section {
103- assert ! ( cargo_content. contains( r#"[[bin]]"# ) ) ;
101+ // Check that Cargo.toml has a bin section pointing to the correct location (if needed)
102+ if needs_bin_section {
103+ assert ! ( cargo_content. contains( r#"[[bin]]"# ) ) ;
104104 assert_that ( & paths:: root ( ) . join ( "foo/src/main.rs" ) , is_not ( existing_file ( ) ) ) ;
105- } else {
106- assert ! ( !cargo_content. contains( r#"[[bin]]"# ) ) ;
105+ } else {
106+ assert ! ( !cargo_content. contains( r#"[[bin]]"# ) ) ;
107107 assert_that ( & paths:: root ( ) . join ( "foo/src/main.rs" ) , existing_file ( ) ) ;
108- }
108+ }
109109}
110110
111111#[ test]
@@ -226,17 +226,17 @@ fn lib_already_exists(rellocation: &str, needs_lib_section: bool) {
226226 File :: open ( & sourcefile_path) . unwrap ( ) . read_to_end ( & mut new_content) . unwrap ( ) ;
227227 assert_eq ! ( Vec :: from( content as & [ u8 ] ) , new_content) ;
228228
229- let mut cargo_content = String :: new ( ) ;
229+ let mut cargo_content = String :: new ( ) ;
230230 File :: open ( & paths:: root ( ) . join ( "foo/Cargo.toml" ) ) . unwrap ( )
231231 . read_to_string ( & mut cargo_content) . unwrap ( ) ;
232- // Check that Cargo.toml has a lib section pointing to the correct location (if needed)
233- if needs_lib_section {
234- assert ! ( cargo_content. contains( r#"[lib]"# ) ) ;
232+ // Check that Cargo.toml has a lib section pointing to the correct location (if needed)
233+ if needs_lib_section {
234+ assert ! ( cargo_content. contains( r#"[lib]"# ) ) ;
235235 assert_that ( & paths:: root ( ) . join ( "foo/src/lib.rs" ) , is_not ( existing_file ( ) ) ) ;
236- } else {
237- assert ! ( !cargo_content. contains( r#"[lib]"# ) ) ;
236+ } else {
237+ assert ! ( !cargo_content. contains( r#"[lib]"# ) ) ;
238238 assert_that ( & paths:: root ( ) . join ( "foo/src/lib.rs" ) , existing_file ( ) ) ;
239- }
239+ }
240240
241241}
242242
0 commit comments