Skip to content

Commit bac5a9a

Browse files
committed
cargo clippy
1 parent c66c2d9 commit bac5a9a

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/engines/ultralight.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use clipboard_rs::{Clipboard, ClipboardContext, ContentFormat};
1+
use clipboard_rs::{Clipboard, ClipboardContext};
22
use iced::keyboard::{self};
33
use iced::mouse::{self, ScrollDelta};
44
use iced::{Point, Size};
@@ -381,7 +381,7 @@ fn iced_key_to_ultralight_key(
381381
modifiers: keyboard::Modifiers,
382382
text: Option<SmolStr>,
383383
) -> Option<event::KeyEvent> {
384-
let (mut text, virtual_key, native_key) = {
384+
let (text, virtual_key, native_key) = {
385385
if let Some(key) = key {
386386
let text = match key {
387387
keyboard::Key::Named(key) => {
@@ -881,7 +881,7 @@ fn iced_key_to_ultralight_key(
881881
shift: modifiers.shift(),
882882
};
883883

884-
let ty = if modifiers.ctrl == true {
884+
let ty = if modifiers.ctrl {
885885
event::KeyEventType::RawKeyDown
886886
} else if !text.is_empty() && text.is_ascii() && press == KeyPress::Press {
887887
event::KeyEventType::Char

src/widgets/bookmark_bar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use super::Message;
44
use crate::Bookmark;
55

66
/// Creates bookmark bar widget
7-
pub fn bookmark_bar(bookmarks: &Vec<Bookmark>) -> Element<Message> {
7+
pub fn bookmark_bar(bookmarks: &[Bookmark]) -> Element<Message> {
88
Row::from_vec(
99
bookmarks
1010
.iter()

src/widgets/command_window.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use strum::IntoEnumIterator;
55

66
use super::Message;
77

8-
pub enum ResultType {
9-
Command(Message),
10-
// Bookmark,
11-
}
8+
// pub enum ResultType {
9+
// Command(Message),
10+
// // Bookmark,
11+
// }
1212

1313
pub struct CommandWindowState {
1414
pub query: String,

src/widgets/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ where
135135
use crate::engines::ultralight::Ultralight;
136136

137137
#[cfg(feature = "ultralight")]
138-
impl<'a, CustomViewState: Clone> BrowserWidget<Ultralight, CustomViewState> {
138+
impl<CustomViewState: Clone> BrowserWidget<Ultralight, CustomViewState> {
139139
pub fn new_basic() -> BrowserWidget<Ultralight, CustomViewState> {
140140
BrowserWidget {
141141
engine: Some(Ultralight::new()),

0 commit comments

Comments
 (0)