Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed Nov 14, 2023
1 parent 2f67039 commit 88d862b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions bindings/python/src/pre_tokenizers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,14 +536,10 @@ impl PyMetaspace {

// If a prepend scheme is provided, set it
if let Some(prepend_scheme) = prepend_scheme {
match _from_string(prepend_scheme) {
Ok(prepend_scheme_enum) => {
new_instance.set_prepend_scheme(prepend_scheme_enum);
}
Err(err) => {
// Handle the error, you can return it or exit the function
return Err(err.into());
}
if let Ok(prepend_scheme_enum) = _from_string(prepend_scheme) {
new_instance.set_prepend_scheme(prepend_scheme_enum);
} else {
return Err(err);
}
}
Ok((PyMetaspace {}, new_instance.into()))
Expand Down

0 comments on commit 88d862b

Please sign in to comment.