[refactor] improve code readability, streamline initialization, update error handling, and format multi-line statements for consistency

This commit is contained in:
2025-08-14 11:06:37 +02:00
parent 0573369b81
commit 0a249f2197
11 changed files with 289 additions and 190 deletions

View File

@@ -1,7 +1,7 @@
use thiserror::Error;
#[derive(Debug, Error)]
/// Error types for the polyscribe-core crate.
#[derive(Debug, Error)]
///
/// This enum represents various error conditions that can occur during
/// operations in this crate, including I/O errors, serialization/deserialization
@@ -27,6 +27,10 @@ pub enum Error {
/// Represents an error that occurred during environment variable access
EnvVar(#[from] std::env::VarError),
#[error("http error: {0}")]
/// Represents an HTTP client error from reqwest
Http(#[from] reqwest::Error),
#[error("other: {0}")]
/// Represents a general error condition with a custom message
Other(String),