docs: fix typo in AsMut documentation

Corrected "work" to "works", and "byte vector" to "a byte vector" to match the phrasing of "a byte slice" in the documentation of the trait `AsMut`

Fixes https://github.com/rust-lang/rust/issues/149609
This commit is contained in:
Alessio 2026-01-02 03:21:59 +01:00 committed by GitHub
parent fcd630976c
commit a3e6de6e81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -308,8 +308,8 @@ pub const trait AsRef<T: PointeeSized>: PointeeSized {
/// both `AsMut<Vec<T>>` and `AsMut<[T]>`.
///
/// In the following, the example functions `caesar` and `null_terminate` provide a generic
/// interface which work with any type that can be converted by cheap mutable-to-mutable conversion
/// into a byte slice (`[u8]`) or byte vector (`Vec<u8>`), respectively.
/// interface which works with any type that can be converted by cheap mutable-to-mutable conversion
/// into a byte slice (`[u8]`) or a byte vector (`Vec<u8>`), respectively.
///
/// [dereference]: core::ops::DerefMut
/// [target type]: core::ops::Deref::Target