Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool, TempomatError> {
if (Utc::now().naive_utc() - self.tempo.last_refresh)
> Duration::seconds(self.tempo.tokens.expires_in as i64)
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/jira/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AtlassianTokens, TempomatError> {
fn prompt(prompt: &str) -> Result<String, TempomatError> {
let mut response = String::new();
Expand Down
2 changes: 1 addition & 1 deletion src/tempo/oauth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down