Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
Similarly to #2775 -- FIXME in typeck::transaction_methods::commit says "could use a vec::clear() that ran destructors but kept the vec at its currently allocated length"
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Activity
kud1ing commentedon Jul 6, 2012
I think
clearwould be counterintuitive to the use in other languages (returning an empty vector/list/array). Maybeblankinstead?jld commentedon Sep 8, 2012
If I understand the issue correctly,
vec::clear(v)can be expressed asvec::truncate(v, 0)as of ec9c68c.catamorphism commentedon Nov 24, 2012
Closing since it's easy enough to use
truncate.Auto merge of rust-lang#2814 - saethlin:warn-on-optimization, r=RalfJung
Update Rust toolchain to 2023-10-09 (rust-lang#2814)
Merge rust-lang#2814