mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-14 14:28:08 +02:00
util: rust: fix some warnings
Fixes some warnings.
21 | pub fn new(data: &[u8]) -> Reader {
| ^^^^^ ------ the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
21 | pub fn new(data: &[u8]) -> Reader<'_> {
| ++++
Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37097>
This commit is contained in:
parent
fcf8899c9e
commit
68f957292e
1 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ pub struct Reader<'slice> {
|
||||||
|
|
||||||
impl<'slice> Reader<'slice> {
|
impl<'slice> Reader<'slice> {
|
||||||
/// Construct a new Reader wrapper over `data`.
|
/// Construct a new Reader wrapper over `data`.
|
||||||
pub fn new(data: &[u8]) -> Reader {
|
pub fn new(data: &[u8]) -> Reader<'_> {
|
||||||
Reader { data }
|
Reader { data }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@ pub struct Writer<'slice> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'slice> Writer<'slice> {
|
impl<'slice> Writer<'slice> {
|
||||||
pub fn new(data: &mut [u8]) -> Writer {
|
pub fn new(data: &mut [u8]) -> Writer<'_> {
|
||||||
Writer { data, index: 0 }
|
Writer { data, index: 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue