Clippy fixed. Fix openrc files

This commit is contained in:
Adrian Woźniak 2021-12-07 16:12:15 +01:00
parent 0b388e2ae3
commit 24ccf0d59f
No known key found for this signature in database
GPG Key ID: 0012845A89C7352B
9 changed files with 21 additions and 21 deletions

View File

@ -3,8 +3,8 @@ use gumdrop::Options;
use amdgpu::utils::hw_mons;
use amdgpu_config::fan::Config;
use crate::{AmdFanError, FanMode};
use crate::command::Fan;
use crate::{AmdFanError, FanMode};
/// Change card fan mode to either automatic or manual
pub fn run(switcher: Switcher, mode: FanMode, config: Config) -> crate::Result<()> {

View File

@ -3,8 +3,8 @@ use gumdrop::Options;
use amdgpu::utils::hw_mons;
use amdgpu_config::fan::Config;
use crate::AmdFanError;
use crate::command::Fan;
use crate::AmdFanError;
/// Start service which will change fan speed according to config and GPU temperature
pub fn run(config: Config) -> crate::Result<()> {

View File

@ -1,7 +1,7 @@
use std::io::ErrorKind;
use crate::{Card, CONFIG_DIR, hw_mon, ROOT_DIR};
use crate::hw_mon::HwMon;
use crate::{hw_mon, Card, CONFIG_DIR, ROOT_DIR};
/// linear mapping from the xrange to the yrange
pub fn linear_map(x: f64, x1: f64, x2: f64, y1: f64, y2: f64) -> f64 {
@ -45,7 +45,7 @@ pub fn hw_mons(filter: bool) -> std::io::Result<Vec<HwMon>> {
}
pub fn ensure_config<Config, Error, P>(config_path: P) -> std::result::Result<Config, Error>
where
where
Config: serde::Serialize + serde::de::DeserializeOwned + Default + Sized,
P: AsRef<std::path::Path>,
Error: From<std::io::Error>,

View File

@ -1,7 +1,7 @@
use amdgpu::utils::hw_mons;
use crate::{Config, VoltageError};
use crate::command::VoltageManipulator;
use crate::{Config, VoltageError};
#[derive(Debug, gumdrop::Options)]
pub struct ApplyChanges {

View File

@ -1,11 +1,11 @@
use amdgpu::hw_mon::HwMon;
use crate::{Config, VoltageError};
use crate::apply_changes::ApplyChanges;
use crate::change_state::ChangeState;
use crate::clock_state::{ClockState, Frequency, Voltage};
use crate::print_states::PrintStates;
use crate::setup_info::SetupInfo;
use crate::{Config, VoltageError};
#[derive(Debug)]
pub enum HardwareModule {

View File

@ -1,7 +1,7 @@
use gumdrop::Options;
use amdgpu::utils::ensure_config_dir;
use amdgpu_config::voltage::{Config, load_config};
use amdgpu_config::voltage::{load_config, Config};
use crate::command::VoltageCommand;
use crate::error::VoltageError;