Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cycle-five committed Jul 17, 2023
1 parent 820dc9e commit 0869971
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/commands/play.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ pub async fn play(
}
};

let guild_id = interaction.guild_id.unwrap().clone();
let guild_id = interaction.guild_id.unwrap();
let manager = songbird::get(ctx).await.unwrap();

// try to join a voice channel if not in one just yet
Expand All @@ -183,7 +183,7 @@ pub async fn play(

// determine whether this is a link or a query string
let query_type = match url {
Some(url) => match_url(ctx, interaction, &url).await?,
Some(url) => match_url(ctx, interaction, url).await?,
None => FileSource::extract(attachment.unwrap().clone()),
};

Expand Down
2 changes: 1 addition & 1 deletion src/sources/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub async fn ffprobe_async_config_url(count_frames: bool, url: Url) -> SongbirdR

let mut cmd = TokioCommand::new("ffprobe");

let out = cmd.args(args).output().await.map_err(|x| Error::Io(x))?;
let out = cmd.args(args).output().await.map_err(Error::Io)?;

serde_json::from_slice::<FfProbe>(&out.stdout).map_err(|x| Error::Json {
error: x,
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub async fn create_now_playing_embed(track: &TrackHandle) -> CreateEmbed {
.as_ref()
.map(|thumbnail| embed.thumbnail(thumbnail));

let source_url = metadata.source_url.unwrap_or_else(|| "".to_string());
let source_url = metadata.source_url.unwrap_or_default();

let (footer_text, footer_icon_url) = get_footer_info(&source_url);
embed.footer(|f| f.text(footer_text).icon_url(footer_icon_url));
Expand Down

0 comments on commit 0869971

Please sign in to comment.