Skip to content

Commit

Permalink
set a default port
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcstephens committed Mar 25, 2024
1 parent b81450b commit cc45882
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ mod mpris;
struct Options {
#[arg(short = 'H', long, help = "LMS hostname")]
hostname: Option<String>,
#[arg(short = 'P', long, help = "LMS port")]
port: Option<u16>,
#[arg(short = 'P', long, help = "LMS port", default_value_t = 9000)]
port: u16,
#[arg(short, long, default_value = "SqueezeLite", help = "Player name")]
player_name: String,
#[arg(
Expand Down Expand Up @@ -120,7 +120,7 @@ async fn main() -> Result<()> {
let (hostname, port) = match options {
Options {
hostname: Some(ref hostname),
port: Some(port),
port,
..
} => (hostname.clone(), port),
_ => {
Expand Down

0 comments on commit cc45882

Please sign in to comment.