Skip to content

Commit

Permalink
feat(rust): use random_name function at NodeManagerDefaults struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtual4087 authored and adrianbenavides committed Oct 13, 2023
1 parent 751d8d9 commit 44d4d65
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ use miette::IntoDiagnostic;
use std::ops::Deref;
use std::path::PathBuf;

use rand::random;

use ockam::{Context, Result, TcpTransport};
use ockam_core::compat::{string::String, sync::Arc};
use ockam_transport_tcp::TcpListenerOptions;

use crate::cli_state::random_name;
use crate::cli_state::{add_project_info_to_node_state, init_node_state, CliState};
use crate::cloud::Controller;
use crate::config::cli::TrustContextConfig;
Expand Down Expand Up @@ -175,7 +174,7 @@ pub struct NodeManagerDefaults {
impl Default for NodeManagerDefaults {
fn default() -> Self {
Self {
node_name: hex::encode(random::<[u8; 4]>()),
node_name: random_name(),
tcp_listener_address: "127.0.0.1:0".to_string(),
}
}
Expand Down

0 comments on commit 44d4d65

Please sign in to comment.