Skip to content

Commit b636e31

Browse files
renovate[bot]ClaudeBrooooooklyn
authored
chore(deps): lock file maintenance (#1115)
* chore(deps): lock file maintenance * fix(jieba): update KeywordExtractConfig builder API for jieba-rs 0.9 Agent-Logs-Url: https://github.com/napi-rs/node-rs/sessions/560e52ee-b4ea-4982-b284-b0cccdf4f949 Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com> Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com> Co-authored-by: LongYinan <lynweklm@gmail.com>
1 parent c0fd9fb commit b636e31

2 files changed

Lines changed: 322 additions & 373 deletions

File tree

packages/jieba/src/lib.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,13 @@ impl TryFrom<KeywordExtractConfig<'_>> for jieba_rs::KeywordExtractConfig {
5959
{}
6060
}
6161

62-
jieba_rs::KeywordExtractConfig::builder()
63-
.set_stop_words(stop_words)
64-
.min_keyword_length(config.min_keyword_length.unwrap_or(2) as usize)
65-
.use_hmm(config.use_hmm.unwrap_or(false))
66-
.build()
67-
.map_err(|err| {
68-
Error::new(
69-
Status::InvalidArg,
70-
format!("Failed to create KeywordExtractConfig from JavaScript value: {err}"),
71-
)
72-
})
62+
Ok(
63+
jieba_rs::KeywordExtractConfig::builder()
64+
.set_stop_words(stop_words)
65+
.min_keyword_length(config.min_keyword_length.unwrap_or(2) as usize)
66+
.use_hmm(config.use_hmm.unwrap_or(false))
67+
.build(),
68+
)
7369
}
7470
}
7571

0 commit comments

Comments
 (0)