fixes so it builds on stable rust

i defaulted my toolchain at some point oops
This commit is contained in:
Lily Tsuru 2024-08-05 00:26:42 -04:00
parent cfbbc37f8a
commit da42dc1f6a
2 changed files with 4 additions and 6 deletions

View file

@ -69,7 +69,6 @@ pub struct Frontend {
// Framebuffer attributes. TODO: This really should be another struct or something // Framebuffer attributes. TODO: This really should be another struct or something
// with members to make dealing with it less annoying. // with members to make dealing with it less annoying.
pub(crate) fb_width: u32, pub(crate) fb_width: u32,
pub(crate) fb_height: u32, pub(crate) fb_height: u32,
pub(crate) fb_pitch: u32, pub(crate) fb_pitch: u32,
@ -194,9 +193,10 @@ impl Frontend {
// TODO: make this a bit less janky (and use Results) // TODO: make this a bit less janky (and use Results)
pub fn load_settings(&mut self) { pub fn load_settings(&mut self) {
let path = self.get_config_file_path(); let path_string = self.get_config_file_path();
let path: &Path = path_string.as_ref();
match fs::exists(path.clone()) { match path.try_exists() {
Ok(exists) => { Ok(exists) => {
if exists { if exists {
let data = fs::read_to_string(path).expect("Could not read config"); let data = fs::read_to_string(path).expect("Could not read config");
@ -209,7 +209,7 @@ impl Frontend {
} }
} }
Err(e) => { Err(e) => {
error!("Can't seem to read {path}: {}", e); error!("Can't seem to read {}: {}", path.display(), e);
} }
} }
} }

View file

@ -27,8 +27,6 @@ impl RfbServer {
let ip_string = std::ffi::CString::new(config.listen_address.to_string())?; let ip_string = std::ffi::CString::new(config.listen_address.to_string())?;
info!("?? {:?}", ip_string);
let argc = 3; let argc = 3;
let argv: [*const std::ffi::c_char; 3] = [ let argv: [*const std::ffi::c_char; 3] = [
b"RfbServer\0".as_ptr() as *const i8, b"RfbServer\0".as_ptr() as *const i8,