lint
This commit is contained in:
parent
a6dbe2cd0a
commit
3173029f5a
10 changed files with 14 additions and 12 deletions
|
@ -43,7 +43,7 @@ pub fn load_config() -> Result<Config> {
|
|||
.open(&path)
|
||||
.context("failed to create config file")?;
|
||||
|
||||
// write into the config file with the example configuration
|
||||
// write into the config file with the example configuration
|
||||
// we put inside the base working directory for the project
|
||||
file.write_all(include_str!("../config.example.ini").as_bytes())
|
||||
.context("failed to write boilerplate config")?;
|
||||
|
@ -59,4 +59,4 @@ pub fn load_config() -> Result<Config> {
|
|||
.context("failed to deserialize ini into a readable format")?;
|
||||
|
||||
Ok(config)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,4 +12,4 @@ pub fn get_scrobbler(config: &Config) -> Result<Scrobbler> {
|
|||
info!(" successfully authenticated");
|
||||
|
||||
return Ok(scrobbler);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,4 +29,4 @@ fn main() -> Result<()> {
|
|||
main_loop::start(&config, scrobbler)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ pub fn start(config: &Config, scrobbler: Scrobbler) -> Result<()> {
|
|||
scrobbled_current_song = true
|
||||
} else if length
|
||||
.map(|length| current_play_time >= length)
|
||||
.unwrap_or(false)
|
||||
.unwrap_or(false)
|
||||
{
|
||||
current_play_time = Duration::from_secs(0);
|
||||
scrobbled_current_song = false;
|
||||
|
|
|
@ -48,4 +48,4 @@ pub fn wait_for_player(config: &Config) -> Result<Player> {
|
|||
|
||||
thread::sleep(INTERVAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,4 +74,4 @@ impl Track {
|
|||
album,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue