]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #91617 - nnethercote:improve-List-readability, r=lcnr
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 11 Dec 2021 15:02:45 +0000 (16:02 +0100)
committerGitHub <noreply@github.com>
Sat, 11 Dec 2021 15:02:45 +0000 (16:02 +0100)
commit1de7815ebb9a001a07625b4bff7518b057b1ac22
tree4ac4912b5b8024fcd22f756a7a9fcf9c7b851084
parentb9a37ad0d995c71518629b032f8e816e1efa8bca
parent769a70726963647c2be6b5a470547bf74088bcbe
Rollup merge of #91617 - nnethercote:improve-List-readability, r=lcnr

Improve the readability of `List<T>`.

This commit does the following.
- Expands on some of the things already mentioned in comments.
- Describes the uniqueness assumption, which is critical but wasn't
  mentioned at all.
- Rewrites `empty()` into a clearer form, as provided by Daniel
  Henry-Mantilla on Zulip.
- Reorders things slightly so that more important things
  are higher up, and incidental things are lower down, which makes
  reading the code easier.

r? ````@lcnr````