Skip to content

Commit

Permalink
Remove unused type generic from map/map_mut
Browse files Browse the repository at this point in the history
I noticed this when updating
Smithay/smithay#1594.

Interesting that clippy doesn't warn about generics that aren't used
anywhere...

This is a breaking change.
  • Loading branch information
ids1024 authored and Drakulix committed Dec 2, 2024
1 parent e3f8bb5 commit 73e3aba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/buffer_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{AsRaw, Format, Modifier, Ptr};

#[cfg(feature = "drm-support")]
use drm::buffer::{Buffer as DrmBuffer, Handle, PlanarBuffer as DrmPlanarBuffer};
use std::os::unix::io::{AsFd, BorrowedFd, FromRawFd, OwnedFd};
use std::os::unix::io::{BorrowedFd, FromRawFd, OwnedFd};

use std::error;
use std::fmt;
Expand Down Expand Up @@ -289,9 +289,8 @@ impl<T: 'static> BufferObject<T> {
/// Map a region of a GBM buffer object for cpu access
///
/// This function maps a region of a GBM bo for cpu read access.
pub fn map<'a, D, F, S>(&'a self, x: u32, y: u32, width: u32, height: u32, f: F) -> IoResult<S>
pub fn map<'a, F, S>(&'a self, x: u32, y: u32, width: u32, height: u32, f: F) -> IoResult<S>
where
D: AsFd + 'static,
F: FnOnce(&MappedBufferObject<'a, T>) -> S,
{
unsafe {
Expand Down Expand Up @@ -328,7 +327,7 @@ impl<T: 'static> BufferObject<T> {
/// Map a region of a GBM buffer object for cpu access
///
/// This function maps a region of a GBM bo for cpu read/write access.
pub fn map_mut<'a, D, F, S>(
pub fn map_mut<'a, F, S>(
&'a mut self,
x: u32,
y: u32,
Expand All @@ -337,7 +336,6 @@ impl<T: 'static> BufferObject<T> {
f: F,
) -> IoResult<S>
where
D: AsFd + 'static,
F: FnOnce(&mut MappedBufferObject<'a, T>) -> S,
{
unsafe {
Expand Down

0 comments on commit 73e3aba

Please sign in to comment.