clippy
This commit is contained in:
parent
f5384a32c0
commit
90dc61bb57
3 changed files with 6 additions and 6 deletions
|
|
@ -457,7 +457,7 @@ impl Uri {
|
|||
}
|
||||
|
||||
impl AsMimeTypes for Uri {
|
||||
fn available<'a>(&'a self) -> Cow<'static, [MimeType]> {
|
||||
fn available(&self) -> Cow<'static, [MimeType]> {
|
||||
Self::allowed()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use std::borrow::Cow;
|
|||
use std::collections::HashMap;
|
||||
use std::io::{Error, ErrorKind, Read};
|
||||
use std::mem;
|
||||
use std::os::unix::io::{AsRawFd, RawFd};
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::rc::Rc;
|
||||
|
||||
use sctk::data_device_manager::data_offer::DragOffer;
|
||||
|
|
@ -15,7 +15,7 @@ use sctk::reexports::client::Proxy;
|
|||
use wayland_backend::client::ObjectId;
|
||||
|
||||
use crate::mime::{AsMimeTypes, MimeType};
|
||||
use crate::state::{set_non_blocking, State, Target};
|
||||
use crate::state::{set_non_blocking, State};
|
||||
use crate::text::Text;
|
||||
|
||||
use super::{DndDestinationRectangle, DndEvent, DndRequest, DndSurface, OfferEvent};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use std::sync::mpsc::Sender;
|
|||
|
||||
use sctk::data_device_manager::data_device::{DataDevice, DataDeviceHandler};
|
||||
use sctk::data_device_manager::data_offer::{DataOfferError, DataOfferHandler, DragOffer};
|
||||
use sctk::data_device_manager::data_source::{CopyPasteSource, DataSourceHandler, DragSource};
|
||||
use sctk::data_device_manager::data_source::{CopyPasteSource, DataSourceHandler};
|
||||
use sctk::data_device_manager::{DataDeviceManagerState, WritePipe};
|
||||
use sctk::primary_selection::device::{PrimarySelectionDevice, PrimarySelectionDeviceHandler};
|
||||
use sctk::primary_selection::selection::{PrimarySelectionSource, PrimarySelectionSourceHandler};
|
||||
|
|
@ -39,7 +39,7 @@ use sctk::reexports::protocols::wp::primary_selection::zv1::client::{
|
|||
use wayland_backend::client::ObjectId;
|
||||
|
||||
use crate::dnd::state::DndState;
|
||||
use crate::dnd::{DndDestinationRectangle, DndSurface};
|
||||
use crate::dnd::DndSurface;
|
||||
use crate::mime::{AsMimeTypes, MimeType};
|
||||
use crate::text::Text;
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ impl<T: 'static + Clone> State<T> {
|
|||
.as_ref()
|
||||
.and_then(|d| d.data().drag_offer())
|
||||
.ok_or_else(|| Error::new(ErrorKind::Other, "offer does not exist."))?;
|
||||
let Some(mime) = allowed_mime_types.get(0) else {
|
||||
let Some(mime) = allowed_mime_types.first() else {
|
||||
return Err(Error::new(
|
||||
ErrorKind::NotFound,
|
||||
"supported mime-type is not found",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue