From 3b5ba0535acfedd0aeef884904a08f19e44625ab Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Wed, 10 Apr 2024 11:33:03 +0800 Subject: [PATCH] Fix typos --- src/config.rs | 2 +- src/error.rs | 4 ++-- src/jira/mod.rs | 2 +- src/tempo/oauth.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config.rs b/src/config.rs index 1860750..4ef0e85 100644 --- a/src/config.rs +++ b/src/config.rs @@ -49,7 +49,7 @@ impl APITokens { Ok(Self { tempo, jira }) } - /// Refreshes tokens if necesarry, returns true if the token was refreshed + /// Refreshes tokens if necessary, returns true if the token was refreshed pub async fn refresh_tokens(&mut self) -> Result { if (Utc::now().naive_utc() - self.tempo.last_refresh) > Duration::seconds(self.tempo.tokens.expires_in as i64) diff --git a/src/error.rs b/src/error.rs index bf1a95e..1defd57 100644 --- a/src/error.rs +++ b/src/error.rs @@ -4,14 +4,14 @@ use thiserror::Error; #[derive(Error)] pub enum TempomatError { #[error("HTTP error: {0:?}")] - ReqwestErrror(#[from] reqwest::Error), + ReqwestError(#[from] reqwest::Error), #[error("Failed to revoke OAuth refresh token: {0:?}")] OAuthRevokeFailed(reqwest::Response), #[error("Failed to join task (this should never happen, please report): {0:?}")] JoinError(#[from] tokio::task::JoinError), #[error("I/O error: {0:?}")] IOError(#[from] std::io::Error), - #[error("Missing Tempo acces codes")] + #[error("Missing Tempo access codes")] MissingTempoAccess, #[error("Missing Jira access codes")] MissingJiraAccess, diff --git a/src/jira/mod.rs b/src/jira/mod.rs index e6f0533..1c8bfa2 100644 --- a/src/jira/mod.rs +++ b/src/jira/mod.rs @@ -18,7 +18,7 @@ pub struct AtlassianTokens { pub email: String, } -/// Retreives the token from CLI +/// Retrieves the token from CLI pub fn get_token() -> Result { fn prompt(prompt: &str) -> Result { let mut response = String::new(); diff --git a/src/tempo/oauth.rs b/src/tempo/oauth.rs index b8c2403..da78bbf 100644 --- a/src/tempo/oauth.rs +++ b/src/tempo/oauth.rs @@ -184,7 +184,7 @@ pub mod server { "Success! You can now close this tab" } else { error!("Failed to get Notifier"); - "Something went terribly wrong, leave your house immediatly" + "Something went terribly wrong, leave your house immediately" } }