Fix naive string indexing in debug
This commit is contained in:
parent
aa2a50110d
commit
a87fead83f
1 changed files with 5 additions and 1 deletions
|
|
@ -197,7 +197,11 @@ mod internal {
|
|||
}
|
||||
|
||||
let message = if message.len() > 49 {
|
||||
format!("{}...", &message[..49])
|
||||
message
|
||||
.chars()
|
||||
.take(49)
|
||||
.chain("...".chars())
|
||||
.collect::<String>()
|
||||
} else {
|
||||
message
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue