Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused type generic from map/map_mut #48

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@

#[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 @@ -43,7 +43,7 @@
///
/// Use [`Device::is_format_supported()`] to check if the combination of format
/// and use flags are supported
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize), serde(transparent))]

Check warning on line 46 in src/buffer_object.rs

View workflow job for this annotation

GitHub Actions / check-minimal

unexpected `cfg` condition value: `cargo-clippy`

Check warning on line 46 in src/buffer_object.rs

View workflow job for this annotation

GitHub Actions / check-minimal

unexpected `cfg` condition value: `cargo-clippy`

Check warning on line 46 in src/buffer_object.rs

View workflow job for this annotation

GitHub Actions / check-minimal

non-local `impl` definition, `impl` blocks should be written at the same level as their item

Check warning on line 46 in src/buffer_object.rs

View workflow job for this annotation

GitHub Actions / check-minimal

non-local `impl` definition, `impl` blocks should be written at the same level as their item
#[derive(Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug)]
pub struct BufferObjectFlags: u32 {
/// Buffer is going to be presented to the screen using an API such as KMS
Expand Down Expand Up @@ -289,9 +289,8 @@
/// 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 @@
/// 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 @@
f: F,
) -> IoResult<S>
where
D: AsFd + 'static,
F: FnOnce(&mut MappedBufferObject<'a, T>) -> S,
{
unsafe {
Expand Down
Loading