Files
rust/src/doc
Dylan DPC 72e6d51583 Rollup merge of #81154 - dylni:improve-design-of-assert-len, r=KodrAus
Improve design of `assert_len`

It was discussed in the [tracking issue](https://github.com/rust-lang/rust/issues/76393#issuecomment-761765448) that `assert_len`'s name and usage are confusing. This PR improves them based on a suggestion by ``@scottmcm`` in that issue.

I also improved the documentation to make it clearer when you might want to use this method.

Old example:

```rust
let range = range.assert_len(slice.len());
```

New example:

```rust
let range = range.ensure_subset_of(..slice.len());
```

Fixes #81157
2021-02-23 02:51:43 +01:00
..
2021-02-16 17:19:28 -08:00
2021-02-16 17:19:28 -08:00
2021-02-16 17:19:28 -08:00
2021-02-16 17:19:28 -08:00
2021-02-16 17:19:28 -08:00
2021-02-16 17:19:28 -08:00
2020-04-08 12:53:12 -05:00
2019-09-30 07:46:10 +02:00
2020-11-04 11:06:42 +01:00
2018-10-05 08:52:44 -07:00
2017-02-21 14:03:13 -05:00
2019-03-24 22:06:34 -04:00
2018-05-17 12:25:24 -07:00