Refactoring
This commit is contained in:
+6
-5
@@ -1,6 +1,7 @@
|
||||
pub mod parser;
|
||||
|
||||
fn main() {
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
println!("clean_file");
|
||||
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
@@ -13,10 +14,10 @@ fn main() {
|
||||
println!("Filepath: {filepath:?}");
|
||||
let prsr = parser::NumberParser{filepath: filepath.clone()};
|
||||
|
||||
match prsr.file_dump() {
|
||||
Ok(numbers) => {
|
||||
prsr.print_values(&numbers);
|
||||
prsr.save_file(numbers);
|
||||
match prsr.file_dump().await {
|
||||
Ok(contacts) => {
|
||||
prsr.print_phone_numbers(&contacts);
|
||||
prsr.save_file(contacts).await;
|
||||
}
|
||||
Err(err) => {
|
||||
eprintln!("Error: {err:?}");
|
||||
|
||||
Reference in New Issue
Block a user