Skip to content

Commit

Permalink
cargo clippy --fix on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVerevkin committed Nov 9, 2024
1 parent be37f67 commit 0d782b8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/blocks/privacy/pipewire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl<'a> Monitor<'a> {
}

#[async_trait]
impl<'a> PrivacyMonitor for Monitor<'a> {
impl PrivacyMonitor for Monitor<'_> {
async fn get_info(&mut self) -> Result<PrivacyInfo> {
let client = CLIENT.as_ref().error("Could not get client")?;
let data = client.data.lock().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/privacy/v4l.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl<'a> Monitor<'a> {
}

#[async_trait]
impl<'a> PrivacyMonitor for Monitor<'a> {
impl PrivacyMonitor for Monitor<'_> {
async fn get_info(&mut self) -> Result<PrivacyInfo> {
let mut mapping: PrivacyInfo = PrivacyInfo::new();

Expand Down
2 changes: 1 addition & 1 deletion src/click.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl<'de> Deserialize<'de> for MouseButton {
{
struct MouseButtonVisitor;

impl<'de> Visitor<'de> for MouseButtonVisitor {
impl Visitor<'_> for MouseButtonVisitor {
type Value = MouseButton;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/themes/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl<'de> Deserialize<'de> for Color {
{
struct ColorVisitor;

impl<'de> Visitor<'de> for ColorVisitor {
impl Visitor<'_> for ColorVisitor {
type Value = Color;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/themes/separator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl<'de> Deserialize<'de> for Separator {
{
struct SeparatorVisitor;

impl<'de> Visitor<'de> for SeparatorVisitor {
impl Visitor<'_> for SeparatorVisitor {
type Value = Separator;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down
10 changes: 5 additions & 5 deletions src/wrappers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<'de, const ALLOW_ONCE: bool> Deserialize<'de> for Seconds<ALLOW_ONCE> {
{
struct SecondsVisitor<const ALLOW_ONCE: bool>;

impl<'de, const ALLOW_ONCE: bool> de::Visitor<'de> for SecondsVisitor<ALLOW_ONCE> {
impl<const ALLOW_ONCE: bool> de::Visitor<'_> for SecondsVisitor<ALLOW_ONCE> {
type Value = Seconds<ALLOW_ONCE>;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down Expand Up @@ -96,7 +96,7 @@ impl<'de> Deserialize<'de> for ShellString {
{
struct Visitor;

impl<'de> de::Visitor<'de> for Visitor {
impl de::Visitor<'_> for Visitor {
type Value = ShellString;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down Expand Up @@ -216,7 +216,7 @@ impl<'de> Deserialize<'de> for SerdeRegex {
{
struct Visitor;

impl<'de> de::Visitor<'de> for Visitor {
impl de::Visitor<'_> for Visitor {
type Value = SerdeRegex;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand All @@ -238,10 +238,10 @@ impl<'de> Deserialize<'de> for SerdeRegex {
/// Display a slice. Similar to Debug impl for slice, but uses Display impl for elements.
pub struct DisplaySlice<'a, T>(pub &'a [T]);

impl<'a, T: Display> Display for DisplaySlice<'a, T> {
impl<T: Display> Display for DisplaySlice<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
struct DisplayAsDebug<'a, T>(&'a T);
impl<'a, T: Display> fmt::Debug for DisplayAsDebug<'a, T> {
impl<T: Display> fmt::Debug for DisplayAsDebug<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(self.0, f)
}
Expand Down

0 comments on commit 0d782b8

Please sign in to comment.