优化代码格式,调整断言和格式化共享日历事件输出
This commit is contained in:
parent
fe2bc3dfd3
commit
2558d6dae1
@ -874,8 +874,12 @@ mod tests {
|
|||||||
®istry,
|
®istry,
|
||||||
);
|
);
|
||||||
|
|
||||||
assert!(matches!(blocks.first(), Some(ContentBlock::Text { text }) if text == "先看这段文字"));
|
assert!(
|
||||||
assert!(matches!(blocks.get(1), Some(ContentBlock::Text { text }) if text.contains("用户发来了一个文件")));
|
matches!(blocks.first(), Some(ContentBlock::Text { text }) if text == "先看这段文字")
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
matches!(blocks.get(1), Some(ContentBlock::Text { text }) if text.contains("用户发来了一个文件"))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1125,7 +1125,10 @@ impl FeishuChannel {
|
|||||||
.get("event_key")
|
.get("event_key")
|
||||||
.and_then(|v| v.as_str())
|
.and_then(|v| v.as_str())
|
||||||
.unwrap_or("unknown");
|
.unwrap_or("unknown");
|
||||||
(format!("[shared calendar event: {}]", event_key), Vec::new())
|
(
|
||||||
|
format!("[shared calendar event: {}]", event_key),
|
||||||
|
Vec::new(),
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
("[shared calendar event]".to_string(), Vec::new())
|
("[shared calendar event]".to_string(), Vec::new())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user