Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ fn main() {

if let Ok(head) = repo.head() {
// add the ref that HEAD points to to rerun-if
if let Ok(pointer) = head.resolve() {
if let Some(name) = pointer.name() {
let path = repo.path().join(name);
println!("cargo::rerun-if-changed={}", path.display());
}
if let Ok(pointer) = head.resolve()
&& let Some(name) = pointer.name()
{
let path = repo.path().join(name);
println!("cargo::rerun-if-changed={}", path.display());
}

// emit the git hash if not overriden
Expand Down
2 changes: 1 addition & 1 deletion src/client/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl Error {
let mut begin = 0;
// ACK [error@command_listNum] {current_command} message_text

for (i, chr) in output.chars().enumerate() {
for (i, chr) in output.char_indices() {
match state {
FindACK => {
let ack = "ACK";
Expand Down
10 changes: 5 additions & 5 deletions src/client/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ impl Song {

vec.push(c.cover_directory.join(&*self.uri));
// Music/Celeste/Resurrections.mp3 -> covers/Celeste
if let Some(p) = self.uri.parent() {
if p.parent().is_some() {
// p.parent() is none if p = ""
vec.push(c.cover_directory.join(p));
}
if let Some(p) = self.uri.parent()
&& p.parent().is_some()
{
// p.parent() is none if p = ""
vec.push(c.cover_directory.join(p));
}

vec.push(c.music_directory.join(&*self.uri));
Expand Down
2 changes: 1 addition & 1 deletion src/dbus/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl PlayerInterface {
}

#[zbus(property)]
async fn metadata(&self) -> HashMap<&str, Value> {
async fn metadata(&self) -> HashMap<&str, Value<'_>> {
let s = self.status.read().await;
let c = config().read().await;

Expand Down
Loading