Skip to content

Commit

Permalink
chore: some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosette committed Apr 9, 2024
1 parent c742eac commit 1d3bdc1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use serde::{Deserialize, Serialize};
use std::{env, fs::File, io::Read};
use toml;
use uuid::Uuid;

pub mod proxy;
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() -> glib::ExitCode {
// Load the CSS from the resource file
app.connect_startup(|_| ui::load_css());
// Connect to "activate" signal of `app`
app.connect_activate(|app| ui::build_ui(app));
app.connect_activate(ui::build_ui);

app.set_accels_for_action("win.about", &["<Ctrl>N"]);

Expand Down
3 changes: 1 addition & 2 deletions src/ui/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,5 @@ pub fn setlogoimage(id: String) -> Revealer {
}

fn get_cache_dir() -> PathBuf {
let path = env::current_dir().unwrap().parent().unwrap().join("cache");
return path;
env::current_dir().unwrap().parent().unwrap().join("cache")
}
5 changes: 2 additions & 3 deletions src/ui/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub async fn login(
if !path.exists() {
fs::create_dir_all(path.parent().unwrap()).unwrap();
}
write(path, &data).unwrap();
write(path, data).unwrap();

Ok(())
}
Expand Down Expand Up @@ -945,6 +945,5 @@ pub async fn playstart(back: Back) {
}

fn get_cache_dir() -> PathBuf {
let path = env::current_dir().unwrap().parent().unwrap().join("cache");
return path;
env::current_dir().unwrap().parent().unwrap().join("cache")
}

0 comments on commit 1d3bdc1

Please sign in to comment.