mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 20:46:38 +08:00
feat(native): sync yocto codes (#14243)
#### PR Dependency Tree * **PR #14243** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Batch management API for coordinated document mutations and change tracking. * New document accessors (IDs, state snapshots, change/delete set queries) and subscriber count. * **Chores** * Upgraded Rust edition across packages to 2024. * Repository-wide formatting, stylistic cleanups and test adjustments. * **Breaking Changes** * Removed the Node native bindings package and its JS/TS declarations and tests (no longer published/available). <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -57,11 +57,11 @@ fn try_remove_label(s: &str, i: usize) -> Option<usize> {
|
||||
return None;
|
||||
}
|
||||
|
||||
if let Some(ch) = s[next_idx..].chars().next() {
|
||||
if ch == '.' {
|
||||
next_idx += ch.len_utf8();
|
||||
return Some(next_idx);
|
||||
}
|
||||
if let Some(ch) = s[next_idx..].chars().next()
|
||||
&& ch == '.'
|
||||
{
|
||||
next_idx += ch.len_utf8();
|
||||
return Some(next_idx);
|
||||
}
|
||||
None
|
||||
}
|
||||
@@ -84,9 +84,7 @@ fn remove_label(s: &str) -> String {
|
||||
|
||||
pub fn clean_content(content: &str) -> String {
|
||||
let content = content.replace("\x00", "");
|
||||
remove_label(&collapse_whitespace(&content))
|
||||
.trim()
|
||||
.to_string()
|
||||
remove_label(&collapse_whitespace(&content)).trim().to_string()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user