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