Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
LegitCamper committed Oct 3, 2024
1 parent c66c2d9 commit bac5a9a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/engines/ultralight.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use clipboard_rs::{Clipboard, ClipboardContext, ContentFormat};
use clipboard_rs::{Clipboard, ClipboardContext};
use iced::keyboard::{self};
use iced::mouse::{self, ScrollDelta};
use iced::{Point, Size};
Expand Down Expand Up @@ -381,7 +381,7 @@ fn iced_key_to_ultralight_key(
modifiers: keyboard::Modifiers,
text: Option<SmolStr>,
) -> Option<event::KeyEvent> {
let (mut text, virtual_key, native_key) = {
let (text, virtual_key, native_key) = {
if let Some(key) = key {
let text = match key {
keyboard::Key::Named(key) => {
Expand Down Expand Up @@ -881,7 +881,7 @@ fn iced_key_to_ultralight_key(
shift: modifiers.shift(),
};

let ty = if modifiers.ctrl == true {
let ty = if modifiers.ctrl {
event::KeyEventType::RawKeyDown
} else if !text.is_empty() && text.is_ascii() && press == KeyPress::Press {
event::KeyEventType::Char
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/bookmark_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::Message;
use crate::Bookmark;

/// Creates bookmark bar widget
pub fn bookmark_bar(bookmarks: &Vec<Bookmark>) -> Element<Message> {
pub fn bookmark_bar(bookmarks: &[Bookmark]) -> Element<Message> {
Row::from_vec(
bookmarks
.iter()
Expand Down
8 changes: 4 additions & 4 deletions src/widgets/command_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use strum::IntoEnumIterator;

use super::Message;

pub enum ResultType {
Command(Message),
// Bookmark,
}
// pub enum ResultType {
// Command(Message),
// // Bookmark,
// }

pub struct CommandWindowState {
pub query: String,
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ where
use crate::engines::ultralight::Ultralight;

#[cfg(feature = "ultralight")]
impl<'a, CustomViewState: Clone> BrowserWidget<Ultralight, CustomViewState> {
impl<CustomViewState: Clone> BrowserWidget<Ultralight, CustomViewState> {
pub fn new_basic() -> BrowserWidget<Ultralight, CustomViewState> {
BrowserWidget {
engine: Some(Ultralight::new()),
Expand Down

0 comments on commit bac5a9a

Please sign in to comment.