Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Jul 12, 2023
1 parent e90ee5b commit 6ec9a9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions provider/datagen/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ impl Default for TrieType {
}
}

#[non_exhaustive]
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize)]
/// The segmentation models to include
pub enum SegmenterModelInclude {
Expand Down
2 changes: 1 addition & 1 deletion provider/datagen/src/transform/segmenter/dictionary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl crate::DatagenProvider {
&self,
req: DataRequest,
) -> Result<UCharDictionaryBreakDataV1<'static>, DataError> {
let model = data_locale_to_model_name(&req.locale)
let model = data_locale_to_model_name(req.locale)
.ok_or(DataErrorKind::MissingLocale.into_error())?;

let filename = format!("segmenter/dictionary/{model}.toml");
Expand Down
2 changes: 1 addition & 1 deletion provider/datagen/src/transform/segmenter/lstm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl DataProvider<LstmForWordLineAutoV1Marker> for crate::DatagenProvider {
) -> Result<DataResponse<LstmForWordLineAutoV1Marker>, DataError> {
self.check_req::<LstmForWordLineAutoV1Marker>(req)?;

let model = data_locale_to_model_name(&req.locale)
let model = data_locale_to_model_name(req.locale)
.ok_or(DataErrorKind::MissingLocale.with_req(LstmForWordLineAutoV1Marker::KEY, req))?;

let lstm_data = self
Expand Down

0 comments on commit 6ec9a9e

Please sign in to comment.