feat: 收口 Rust Web 3000 主链

This commit is contained in:
lix-2026
2026-05-11 13:16:34 +08:00
parent 7f3f7d4e2f
commit 17c003976b
61 changed files with 2090 additions and 2256 deletions
@@ -57,12 +57,12 @@ pub async fn local_folder_events(
let stream = stream::unfold(
(Some(initial), subscription, document_relative_path),
|(initial, mut subscription, document_relative_path)| async move {
if let Some(payload) = initial {
return Some((
Ok(stream_event("ready", &payload)),
(None, subscription, document_relative_path),
));
}
if let Some(payload) = initial {
return Some((
Ok(stream_event("ready", &payload)),
(None, subscription, document_relative_path),
));
}
loop {
match subscription.receiver.recv().await {
Ok(payload) => {
@@ -152,8 +152,7 @@ mod tests {
#[test]
fn local_markdown_document_id_maps_to_relative_path() {
assert_eq!(
local_markdown_relative_path_from_document_id("local-md:docs~2FREADME.md")
.as_deref(),
local_markdown_relative_path_from_document_id("local-md:docs~2FREADME.md").as_deref(),
Some("docs/README.md")
);
}