♻️ refactor(labels): simplify error handling in labels module

- use `crate::Result` alias for `Result<T, Error>` to reduce redundancy
This commit is contained in:
Jeremiah Russell
2025-10-09 16:39:21 +01:00
committed by Jeremiah Russell
parent a114023ec8
commit ca1ab60c50

View File

@@ -11,7 +11,7 @@ use google_gmail1::{
yup_oauth2::{ApplicationSecret, InstalledFlowAuthenticator, InstalledFlowReturnMethod},
};
use crate::{Credential, Error};
use crate::{Credential, Result};
/// Default for the maximum number of results to return on a page
pub const DEFAULT_MAX_RESULTS: &str = "10";
@@ -34,7 +34,7 @@ impl std::fmt::Debug for Labels {
impl Labels {
/// Create a new List struct and add the Gmail api connection.
pub async fn new(credential: &str, show: bool) -> Result<Self, Error> {
pub async fn new(credential: &str, show: bool) -> Result<Self> {
let (config_dir, secret) = {
let config_dir = crate::utils::assure_config_dir_exists("~/.cull-gmail")?;