Commit 783062d
committed
Auto merge of #154095 - joboet:vec_clear_truncate, r=nnethercote
std: implement `clear` via `truncate`
This gets rid of some `unsafe`. `truncate(0)` is even documented to be equivalent to `clear`, this makes that equivalence even more obvious.1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2992 | 2992 | | |
2993 | 2993 | | |
2994 | 2994 | | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
2995 | 2999 | | |
2996 | 3000 | | |
2997 | 3001 | | |
| |||
0 commit comments