Skip to content

Commit

Permalink
nice code
Browse files Browse the repository at this point in the history
Signed-off-by: kaixuanliu <[email protected]>
  • Loading branch information
kaixuanliu committed Sep 27, 2024
1 parent 6ccc883 commit 92d2821
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions backends/python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ impl PythonBackend {
match model_type {
ModelType::Classifier => {}
ModelType::Embedding(pool) => {
match pool {
Pool::Splade => {
return Err(BackendError::Start(format!("{pool:?} is not supported")));
},
_ => {
pool_type = pool;
}
if pool == Pool::Splade {
return Err(BackendError::Start(format!("{pool:?} is not supported")));
}
pool_type = pool;
}
};

Expand Down
2 changes: 1 addition & 1 deletion backends/python/src/management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl BackendProcess {
Pool::LastToken => "lasttoken",
Pool::Splade => {
return Err(BackendError::Start(format!("{pool:?} is not supported")));
},
}
};

// Process args
Expand Down

0 comments on commit 92d2821

Please sign in to comment.