Skip to content

Commit

Permalink
fix(examples): silence std::env::home_dir() deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
junderw committed Dec 12, 2022
1 parent 52aaa61 commit c33390b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions common/examples/lowlevel_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct GetInfoResponse {
struct GetInfoRequest {}

fn main() {
#[allow(deprecated)]
let sock = env::home_dir().unwrap().join(".lightning/lightning-rpc");
println!("Using socket {}", sock.display());
let client = client::Client::new(&sock);
Expand Down
1 change: 1 addition & 0 deletions common/examples/lowlevel_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::env;
use clightningrpc_common::{client, types};

fn main() {
#[allow(deprecated)]
let sock = env::home_dir().unwrap().join(".lightning/lightning-rpc");
println!("Using socket {}", sock.display());
let client = client::Client::new(&sock);
Expand Down
1 change: 1 addition & 0 deletions rpc/examples/ex_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::env;
use clightningrpc::LightningRPC;

fn main() {
#[allow(deprecated)]
let sock = env::home_dir().unwrap().join(".lightning/lightning-rpc");
println!("Using socket {}", sock.display());

Expand Down

0 comments on commit c33390b

Please sign in to comment.