Skip to content

Commit

Permalink
chore: fix unused warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mmstick committed Oct 10, 2024
1 parent b394c45 commit 4cbc7da
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 13 deletions.
5 changes: 3 additions & 2 deletions cosmic-settings/src/pages/bluetooth/agent.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2024 System76 <[email protected]>
// SPDX-License-Identifier: GPL-3.0-only

use std::sync::Arc;

use futures::{SinkExt, StreamExt};
Expand Down Expand Up @@ -60,5 +63,3 @@ pub async fn watch(

Ok(())
}

pub enum Message {}
2 changes: 0 additions & 2 deletions cosmic-settings/src/pages/bluetooth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ impl page::Page<crate::pages::Message> for Page {

Some(dialog)
}

_ => None,
}
}
}
Expand Down
1 change: 0 additions & 1 deletion cosmic-settings/src/pages/networking/wired.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@ impl Page {
fn devices_view() -> Section<crate::pages::Message> {
crate::slab!(descriptions {
wired_conns_txt = fl!("wired", "connections");
wired_devices_txt = fl!("wired", "devices");
remove_txt = fl!("wired", "remove");
connect_txt = fl!("connect");
connected_txt = fl!("connected");
Expand Down
6 changes: 0 additions & 6 deletions cosmic-settings/src/pages/power/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ impl GetCurrentPowerProfile for PowerBackendEnum {
}
}

pub trait PowerBackend: SetPowerProfile + GetCurrentPowerProfile {}

pub async fn get_backend() -> Option<PowerBackendEnum> {
match get_s76power_daemon_proxy().await {
Ok(p) => match p.get_profile().await {
Expand Down Expand Up @@ -99,8 +97,6 @@ pub fn get_power_profiles() -> Vec<PowerProfile> {

pub struct S76Backend {}

impl PowerBackend for S76Backend {}

impl SetPowerProfile for S76Backend {
async fn set_power_profile(&self, profile: PowerProfile) {
let Ok(daemon) = get_s76power_daemon_proxy().await else {
Expand Down Expand Up @@ -164,8 +160,6 @@ async fn get_s76power_daemon_proxy<'a>() -> Result<s76powerdaemon::PowerDaemonPr

pub struct PPBackend {}

impl PowerBackend for PPBackend {}

impl SetPowerProfile for PPBackend {
async fn set_power_profile(&self, profile: PowerProfile) {
let daemon = match get_power_profiles_proxy().await {
Expand Down
2 changes: 1 addition & 1 deletion cosmic-settings/src/pages/sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ impl Page {
Message::Pipewire(pipewire::DeviceEvent::Remove(node_id)) => {
let mut remove = None;
for (card_id, card) in &mut self.devices {
if card.devices.remove(&node_id).is_some() {
if card.devices.shift_remove(&node_id).is_some() {
if card.devices.is_empty() {
remove = Some(card_id.clone());
}
Expand Down
1 change: 0 additions & 1 deletion cosmic-settings/src/pages/time/date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ impl page::AutoBind<crate::pages::Message> for Page {}
fn date() -> Section<crate::pages::Message> {
let mut descriptions = Slab::new();

let auto = descriptions.insert(fl!("time-date", "auto"));
let title = descriptions.insert(fl!("time-date"));

Section::default()
Expand Down

0 comments on commit 4cbc7da

Please sign in to comment.