Remove unused code

This commit is contained in:
Lucy 2022-02-16 10:56:27 -05:00
parent 83d2cb249f
commit 835774a5a7
No known key found for this signature in database
GPG key ID: EBC517FAD666BBF1
3 changed files with 0 additions and 39 deletions

View file

@ -21,17 +21,6 @@ pub async fn get_current_graphics(daemon: &PowerDaemonProxy<'_>) -> Result<Graph
}
}
pub async fn get_default_graphics(daemon: &PowerDaemonProxy<'_>) -> Result<Graphics> {
let graphics = daemon.get_default_graphics().await?;
match graphics.as_str() {
"integrated" => Ok(Graphics::Integrated),
"hybrid" => Ok(Graphics::Hybrid),
"nvidia" => Ok(Graphics::Nvidia),
"compute" => Ok(Graphics::Compute),
_ => panic!("Unknown graphics profile: {}", graphics),
}
}
pub async fn set_graphics(daemon: &PowerDaemonProxy<'_>, graphics: Graphics) -> Result<()> {
let graphics_str = match graphics {
Graphics::Integrated => "integrated",

View file

@ -8,7 +8,6 @@ extern crate relm4_macros;
pub mod dbus;
pub mod graphics;
pub mod mode_box;
pub mod profile;
use self::{dbus::PowerDaemonProxy, graphics::Graphics, mode_box::ModeSelection};
use gtk4::{

View file

@ -1,27 +0,0 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
use crate::dbus::PowerDaemonProxy;
use zbus::Result;
pub enum Profile {
Performance,
Balanced,
Battery,
}
pub async fn get_current_profile(daemon: &PowerDaemonProxy<'_>) -> Result<Profile> {
let profile = daemon.get_profile().await?;
match profile.as_str() {
"Performance" => Ok(Profile::Performance),
"Balanced" => Ok(Profile::Balanced),
"Battery" => Ok(Profile::Battery),
_ => panic!("Unknown profile: {}", profile),
}
}
pub async fn set_profile(daemon: &PowerDaemonProxy<'_>, profile: Profile) -> zbus::Result<()> {
match profile {
Profile::Performance => daemon.performance().await,
Profile::Balanced => daemon.balanced().await,
Profile::Battery => daemon.battery().await,
}
}