Skip to content

Commit

Permalink
Fix typos (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng authored Oct 13, 2023
1 parent bd1659a commit d62339b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lyric_finder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Client {
}
}

/// Construct a client reusing an exisiting http client
/// Construct a client reusing an existing http client
pub fn from_http_client(http: &reqwest::Client) -> Self {
Self { http: http.clone() }
}
Expand Down
2 changes: 1 addition & 1 deletion spotify_player/src/cli/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use clap::{ArgMatches, Id};
use std::net::UdpSocket;

fn receive_response(socket: &UdpSocket) -> Result<Response> {
// read response from the server's socket, which can be splitted into
// read response from the server's socket, which can be split into
// smaller chunks of data
let mut data = Vec::new();
let mut buf = [0; 4096];
Expand Down
4 changes: 2 additions & 2 deletions spotify_player/src/client/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async fn handle_queue_change_event(
}
if needs_update {
// In addition to `GetCurrentUserQueue` request, also update the current playback
// as there can be a mistmatch between the current playback and the current queue.
// as there can be a mismatch between the current playback and the current queue.
client_pub
.send_async(ClientRequest::GetCurrentPlayback)
.await?;
Expand Down Expand Up @@ -139,7 +139,7 @@ pub async fn start_player_event_watchers(

// Start the second task (main blocking task) for handling "high-frequency" events.
// An event is categorized as "high-frequency" when
// - we want to handle it "immediately" to prevent users from experiencing a noticable delay
// - we want to handle it "immediately" to prevent users from experiencing a noticeable delay
let refresh_duration = std::time::Duration::from_millis(200); // frequency = 5Hz

// This timer is used to avoid making multiple `GetContext` requests in a short period of time.
Expand Down
6 changes: 3 additions & 3 deletions spotify_player/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Client {
.transfer_playback(&device_id, Some(force_play))
.await?;

tracing::info!("Transfered the playback to device with {} id", device_id);
tracing::info!("Transferred the playback to device with {} id", device_id);
return Ok(());
}

Expand Down Expand Up @@ -194,7 +194,7 @@ impl Client {
.await?
}
PlayerRequest::TransferPlayback(..) => {
anyhow::bail!("`TransferPlayback` should be handled ealier")
anyhow::bail!("`TransferPlayback` should be handled earlier")
}
};

Expand Down Expand Up @@ -780,7 +780,7 @@ impl Client {
Ok(tracks)
}

/// searchs for items (tracks, artists, albums, playlists) that match a given query string.
/// searches for items (tracks, artists, albums, playlists) that match a given query string.
pub async fn search(&self, query: &str) -> Result<SearchResults> {
let (track_result, artist_result, album_result, playlist_result) = tokio::try_join!(
self.search_specific_type(query, rspotify_model::SearchType::Track),
Expand Down
2 changes: 1 addition & 1 deletion spotify_player/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl Command {
Self::LikedTrackPage => "go to the user liked track page",
#[cfg(feature = "lyric-finder")]
Self::LyricPage => "go to the lyric page of the current track",
Self::LibraryPage => "go to the user libary page",
Self::LibraryPage => "go to the user library page",
Self::SearchPage => "go to the search page",
Self::BrowsePage => "go to the browse page",
Self::PreviousPage => "go to the previous page",
Expand Down
2 changes: 1 addition & 1 deletion spotify_player/src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl std::fmt::Display for Key {
Key::Ctrl(k) => write!(f, "C-{}", key_code_to_string(k)),
Key::Alt(k) => write!(f, "M-{}", key_code_to_string(k)),
Key::None(k) => write!(f, "{}", key_code_to_string(k)),
Key::Unknown => write!(f, "unkown key"),
Key::Unknown => write!(f, "unknown key"),
}
}
}
Expand Down

0 comments on commit d62339b

Please sign in to comment.