chore: fix unused warnings
This commit is contained in:
parent
b394c45fef
commit
4cbc7da0d9
6 changed files with 4 additions and 13 deletions
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2024 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use futures::{SinkExt, StreamExt};
|
||||
|
|
@ -60,5 +63,3 @@ pub async fn watch(
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub enum Message {}
|
||||
|
|
|
|||
|
|
@ -146,8 +146,6 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
|
||||
Some(dialog)
|
||||
}
|
||||
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
@ -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 {
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue