Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeantonio21 committed Apr 29, 2024
1 parent 551423b commit a3461df
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions atoma-inference/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,13 @@ pub enum ModelServiceError {
#[error("Core error: `{0}`")]
ModelThreadError(ModelThreadError),
#[error("Api error: `{0}`")]
ApiError(ApiError),
ApiError(#[from] ApiError),
#[error("Candle error: `{0}`")]
CandleError(CandleError),
CandleError(#[from] CandleError),
#[error("Sender error: `{0}`")]
SendError(String),
}

impl From<ApiError> for ModelServiceError {
fn from(error: ApiError) -> Self {
Self::ApiError(error)
}
}

impl From<CandleError> for ModelServiceError {
fn from(error: CandleError) -> Self {
Self::CandleError(error)
}
}

#[cfg(test)]
mod tests {
use std::io::Write;
Expand Down

0 comments on commit a3461df

Please sign in to comment.