improve alloc stats interface; fix admin command formatting
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
2a304c2b6c
commit
16e76d45cb
5 changed files with 20 additions and 24 deletions
|
@ -632,12 +632,12 @@ pub(super) async fn resolve_true_destination(
|
|||
pub(super) fn memory_stats() -> RoomMessageEventContent {
|
||||
let html_body = conduit::alloc::memory_stats();
|
||||
|
||||
if html_body.is_empty() {
|
||||
if html_body.is_none() {
|
||||
return RoomMessageEventContent::text_plain("malloc stats are not supported on your compiled malloc.");
|
||||
}
|
||||
|
||||
RoomMessageEventContent::text_html(
|
||||
"This command's output can only be viewed by clients that render HTML.".to_owned(),
|
||||
html_body,
|
||||
html_body.expect("string result"),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue