Skip to content

Commit ccdfd9c

Browse files
committed
export is_valuable_text
1 parent 30af6ad commit ccdfd9c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/aio-translator/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ pub use aio_translator_whatlang::WhatLangDetector;
3030
pub use aio_translator_youdao::YoudaoTranslator;
3131
pub use ct2rs::ComputeType;
3232
pub use style_transfer::StyleTransfer;
33+
pub use style_transfer::is_valuable_text;
3334

3435
#[cfg(test)]
3536
mod tests {

crates/aio-translator/src/style_transfer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ fn is_control(ch: char) -> bool {
242242
)
243243
}
244244

245-
fn is_valuable_text(text: &str) -> bool {
245+
pub fn is_valuable_text(text: &str) -> bool {
246246
text.chars().any(|v| is_valuable_char(v))
247247
}
248248

0 commit comments

Comments
 (0)