chore: small cleanup

This commit is contained in:
Gabriele Musco 2024-08-19 07:37:38 +02:00
commit fe077f3f8b
3 changed files with 11 additions and 14 deletions

View file

@ -1,3 +1,8 @@
use crate::{
file_utils::get_writer,
profile::{Profile, XRServiceType},
runner::{Runner, RunnerStatus},
};
use nix::{
sys::signal::{
kill,
@ -5,12 +10,6 @@ use nix::{
},
unistd::Pid,
};
use crate::{
file_utils::get_writer,
profile::{Profile, XRServiceType},
runner::{Runner, RunnerStatus},
};
use std::{
collections::HashMap,
io::{BufRead, BufReader, Write},

View file

@ -1,5 +1,3 @@
use serde::{de::Error, Deserialize, Serialize};
use crate::{
constants::CMD_NAME,
device_prober::PhysicalXRDevice,
@ -11,15 +9,16 @@ use crate::{
survive::survive_profile, wivrn::wivrn_profile, wmr::wmr_profile,
},
};
use serde::{de::Error, Deserialize, Serialize};
use std::{
fs::File,
io::BufReader,
path::{Path, PathBuf},
};
fn default_win_size() -> [i32; 2] {
[360, 400]
}
const DEFAULT_WIN_SIZE: [i32; 2] = [360, 400];
const fn default_win_size() -> [i32; 2] { DEFAULT_WIN_SIZE }
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Config {
@ -37,7 +36,7 @@ impl Default for Config {
selected_profile_uuid: "".to_string(),
debug_view_enabled: false,
user_profiles: vec![],
win_size: default_win_size(),
win_size: DEFAULT_WIN_SIZE,
}
}
}

View file

@ -1,5 +1,4 @@
use crate::paths::get_exec_prefix;
use std::path::PathBuf;
pub const APP_NAME: &str = "@PRETTY_NAME@";
@ -18,7 +17,7 @@ pub const BUILD_PROFILE: &str = "@PROFILE@";
pub const BUILD_DATETIME: &str = "@BUILD_DATETIME@";
pub fn get_developers() -> Vec<String> {
vec!["Gabriele Musco <gabmus@disroot.org>".to_string()]
vec!["Gabriele Musco <gabmus@disroot.org>".into()]
}
pub fn pkg_data_dir() -> PathBuf {