Skip to content

Commit

Permalink
cli: style fixes
Browse files Browse the repository at this point in the history
Long term we need to integrate style checks (rustfmt) into our CI
pipeline.

Signed-off-by: Renato Westphal <[email protected]>
  • Loading branch information
rwestphal committed Sep 2, 2023
1 parent 9b7b132 commit 7e2912e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions holo-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fn main() {
.value_name("COMMAND")
.help("Execute argument as command")
.multiple(true),
)
)
.arg(
Arg::with_name("address")
.short("a")
Expand All @@ -154,17 +154,17 @@ fn main() {
.multiple(false),
)
.get_matches();
let addr = matches
.value_of("address")
.unwrap_or("http://[::1]:50051")
.to_string();
let grpc_addr: &'static str = Box::leak(addr.into_boxed_str());
// Initialize YANG context and gRPC client.
let mut yang_ctx = yang::new_context();
let mut client = GrpcClient::connect(grpc_addr)
.expect("Failed to connect to holod");

let addr = matches
.value_of("address")
.unwrap_or("http://[::1]:50051")
.to_string();
let grpc_addr: &'static str = Box::leak(addr.into_boxed_str());

// Initialize YANG context and gRPC client.
let mut yang_ctx = yang::new_context();
let mut client =
GrpcClient::connect(grpc_addr).expect("Failed to connect to holod");
client.load_modules(&mut yang_ctx);
YANG_CTX.set(Arc::new(yang_ctx)).unwrap();

Expand Down

0 comments on commit 7e2912e

Please sign in to comment.