Skip to content

Commit

Permalink
feat: nsv cli macro_rules print_log_1 change name
Browse files Browse the repository at this point in the history
rename nsv cli log macro_rules print_log_1 to print_log_info
  • Loading branch information
1739616529 committed Aug 8, 2024
1 parent 5c9ecc9 commit 599f8f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/nsv/src/command/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use async_trait::async_trait;
use thiserror::Error;
use root::core::NsvCore;

use crate::print_log_1;
use crate::print_log_info;

use super::Command;
use root::node::{NodeDispose, NsvCoreError};
Expand Down Expand Up @@ -39,7 +39,7 @@ impl Command for Add {

core.unzip_node_file(&download_node_info.target).await;

print_log_1!("{} added", &remote_node_version.version);
print_log_info!("{} added", &remote_node_version.version);
Ok(())
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/nsv/src/command/use.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use async_trait::async_trait;
use root::{core::NsvCore, node::NodeDispose};

use crate::print_log_1;
use crate::print_log_info;

use super::Command;
use root::node::NsvCoreError;
Expand All @@ -22,7 +22,7 @@ impl Command for Use {
}
let local_node_version = local_node_version.as_ref().unwrap();
core.sync_mate_file_by_version(local_node_version).await;
print_log_1!("use version: {}", local_node_version);
print_log_info!("use version: {}", local_node_version);
Ok(())
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/nsv/src/log/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


#[macro_export]
macro_rules! print_log_1 {
macro_rules! print_log_info {
($($arg:tt)*) => {{
println!("nsv: {}", format_args!($($arg)*));
}};
Expand Down

0 comments on commit 599f8f3

Please sign in to comment.