From 91b7f262de3584ea540f8dcb5885776618aeb6e5 Mon Sep 17 00:00:00 2001 From: emilyaherbert Date: Wed, 13 Oct 2021 15:23:59 -0500 Subject: [PATCH] Visually align everything. --- forc/src/ops/forc_build.rs | 28 ++++++++++++++-------------- test/src/e2e_vm_tests/harness.rs | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/forc/src/ops/forc_build.rs b/forc/src/ops/forc_build.rs index b9caec5959c..ce1e5c0f7ba 100644 --- a/forc/src/ops/forc_build.rs +++ b/forc/src/ops/forc_build.rs @@ -136,7 +136,7 @@ pub fn build(command: BuildCommand) -> Result, String> { file.write_all(main.as_slice()).map_err(|e| e.to_string())?; } - println!("Bytecode size is {} bytes.", main.len()); + println!(" Bytecode size is {} bytes.", main.len()); Ok(main) } @@ -253,10 +253,10 @@ fn compile_library<'source, 'manifest>( } if warnings.is_empty() { - let _ = println_green_err(&format!("Compiled library {:?}.", proj_name)); + let _ = println_green_err(&format!(" Compiled library {:?}.", proj_name)); } else { let _ = println_yellow_err(&format!( - "Compiled library {:?} with {} {}.", + " Compiled library {:?} with {} {}.", proj_name, warnings.len(), if warnings.len() > 1 { @@ -278,7 +278,7 @@ fn compile_library<'source, 'manifest>( } println_red_err(&format!( - "Aborting due to {} {}.", + " Aborting due to {} {}.", e_len, if e_len > 1 { "errors" } else { "error" } )) @@ -310,10 +310,10 @@ fn compile<'source, 'manifest>( } if warnings.is_empty() { - let _ = println_green_err(&format!("Compiled script {:?}.", proj_name)); + let _ = println_green_err(&format!(" Compiled script {:?}.", proj_name)); } else { let _ = println_yellow_err(&format!( - "Compiled script {:?} with {} {}.", + " Compiled script {:?} with {} {}.", proj_name, warnings.len(), if warnings.len() > 1 { @@ -331,10 +331,10 @@ fn compile<'source, 'manifest>( } if warnings.is_empty() { - let _ = println_green_err(&format!("Compiled library {:?}.", proj_name)); + let _ = println_green_err(&format!(" Compiled library {:?}.", proj_name)); } else { let _ = println_yellow_err(&format!( - "Compiled library {:?} with {} {}.", + " Compiled library {:?} with {} {}.", proj_name, warnings.len(), if warnings.len() > 1 { @@ -356,7 +356,7 @@ fn compile<'source, 'manifest>( } println_red_err(&format!( - "Aborting due to {} {}.", + " Aborting due to {} {}.", e_len, if e_len > 1 { "errors" } else { "error" } )) @@ -448,10 +448,10 @@ fn compile_to_asm<'source, 'manifest>( warnings.iter().for_each(|warning| format_warning(warning)); if warnings.is_empty() { - let _ = println_green_err(&format!("Compiled script {:?}.", proj_name)); + let _ = println_green_err(&format!(" Compiled script {:?}.", proj_name)); } else { let _ = println_yellow_err(&format!( - "Compiled script {:?} with {} {}.", + " Compiled script {:?} with {} {}.", proj_name, warnings.len(), if warnings.len() > 1 { @@ -467,10 +467,10 @@ fn compile_to_asm<'source, 'manifest>( warnings.iter().for_each(|warning| format_warning(warning)); if warnings.is_empty() { - let _ = println_green_err(&format!("Compiled library {:?}.", proj_name)); + let _ = println_green_err(&format!(" Compiled library {:?}.", proj_name)); } else { let _ = println_yellow_err(&format!( - "Compiled library {:?} with {} {}.", + " Compiled library {:?} with {} {}.", proj_name, warnings.len(), if warnings.len() > 1 { @@ -490,7 +490,7 @@ fn compile_to_asm<'source, 'manifest>( errors.into_iter().for_each(|error| format_err(error)); println_red_err(&format!( - "Aborting due to {} {}.", + " Aborting due to {} {}.", e_len, if e_len > 1 { "errors" } else { "error" } )) diff --git a/test/src/e2e_vm_tests/harness.rs b/test/src/e2e_vm_tests/harness.rs index 266a0cdc4db..f9041300f00 100644 --- a/test/src/e2e_vm_tests/harness.rs +++ b/test/src/e2e_vm_tests/harness.rs @@ -8,7 +8,7 @@ use rand::{Rng, SeedableRng}; pub(crate) fn deploy_contract(file_name: &str) { // build the contract // deploy it - println!("Deploying {}", file_name); + println!(" Deploying {}", file_name); let manifest_dir = env!("CARGO_MANIFEST_DIR"); tokio::runtime::Runtime::new() @@ -137,7 +137,7 @@ pub(crate) fn does_not_compile(file_name: &str) { /// Returns `true` if a file compiled without any errors or warnings, /// and `false` if it did not. pub(crate) fn compile_to_bytes(file_name: &str) -> Result, String> { - println!("Compiling {}", file_name); + println!(" Compiling {}", file_name); let manifest_dir = env!("CARGO_MANIFEST_DIR"); forc_build::build(BuildCommand { path: Some(format!(