rusticl: fix clippy::needless-lifetimes
Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32723>
This commit is contained in:
@@ -51,7 +51,7 @@ pub struct CLInfoValue<'a> {
|
||||
param_value_size_ret: Option<&'a mut MaybeUninit<usize>>,
|
||||
}
|
||||
|
||||
impl<'a> CLInfoValue<'a> {
|
||||
impl CLInfoValue<'_> {
|
||||
/// # Safety
|
||||
/// `param_value` and `param_value_size_ret` need to be valid memory allocations or null.
|
||||
/// If `param_value` is not null it needs to point to an allocation of at least
|
||||
|
||||
@@ -117,7 +117,7 @@ pub struct HelperContext<'a> {
|
||||
lock: MutexGuard<'a, PipeContext>,
|
||||
}
|
||||
|
||||
impl<'a> HelperContext<'a> {
|
||||
impl HelperContext<'_> {
|
||||
pub fn resource_copy_region(
|
||||
&self,
|
||||
src: &PipeResource,
|
||||
@@ -151,7 +151,7 @@ impl<'a> HelperContext<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> HelperContextWrapper for HelperContext<'a> {
|
||||
impl HelperContextWrapper for HelperContext<'_> {
|
||||
fn exec<F>(&self, func: F) -> PipeFence
|
||||
where
|
||||
F: Fn(&HelperContext),
|
||||
|
||||
@@ -45,7 +45,7 @@ pub struct CLCHeader<'a> {
|
||||
pub source: &'a CString,
|
||||
}
|
||||
|
||||
impl<'a> Debug for CLCHeader<'a> {
|
||||
impl Debug for CLCHeader<'_> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let name = self.name.to_string_lossy();
|
||||
let source = self.source.to_string_lossy();
|
||||
|
||||
@@ -60,7 +60,7 @@ impl<'a, R> PipeQuery<'a, R> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, R> Drop for PipeQuery<'a, R> {
|
||||
impl<R> Drop for PipeQuery<'_, R> {
|
||||
fn drop(&mut self) {
|
||||
// SAFETY: we are the only owner of that valid pointer
|
||||
unsafe {
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct PipeTransfer<'a> {
|
||||
// SAFETY: Transfers are safe to send between threads
|
||||
unsafe impl Send for PipeTransfer<'_> {}
|
||||
|
||||
impl<'a> Drop for PipeTransfer<'a> {
|
||||
impl Drop for PipeTransfer<'_> {
|
||||
fn drop(&mut self) {
|
||||
if self.is_buffer {
|
||||
self.ctx.buffer_unmap(self.pipe);
|
||||
|
||||
@@ -117,7 +117,7 @@ pub struct DiskCacheEntry<'a> {
|
||||
data: &'a mut [u8],
|
||||
}
|
||||
|
||||
impl<'a> Deref for DiskCacheEntry<'a> {
|
||||
impl Deref for DiskCacheEntry<'_> {
|
||||
type Target = [u8];
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
@@ -125,7 +125,7 @@ impl<'a> Deref for DiskCacheEntry<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Drop for DiskCacheEntry<'a> {
|
||||
impl Drop for DiskCacheEntry<'_> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
free(self.data.as_mut_ptr().cast());
|
||||
|
||||
Reference in New Issue
Block a user