mirror of
https://github.com/ow-mods/ow-mod-man.git
synced 2025-12-11 20:15:50 +01:00
[CHORE] Rust Format
This commit is contained in:
parent
07a43d3fe8
commit
dc62ae1040
@ -4,6 +4,7 @@ use std::{
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
use crate::format_description;
|
||||
use anyhow::Result;
|
||||
use log::{warn, Level, STATIC_MAX_LEVEL};
|
||||
use owmods_core::file::get_app_path;
|
||||
@ -11,7 +12,6 @@ use owmods_core::progress::ProgressPayload;
|
||||
use serde::Serialize;
|
||||
use std::fs::create_dir_all;
|
||||
use tauri::{async_runtime, AppHandle, Manager};
|
||||
use crate::format_description;
|
||||
use time::OffsetDateTime;
|
||||
use typeshare::typeshare;
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
|
||||
use std::process::Command;
|
||||
|
||||
use anyhow::Result;
|
||||
use serde_json::{Value, from_str};
|
||||
use toml_edit::{Document, value};
|
||||
use serde_json::{from_str, Value};
|
||||
use toml_edit::{value, Document};
|
||||
|
||||
const GUI_TAURI_CONF_PATH: &str = "owmods_gui/backend/tauri.conf.json";
|
||||
const GUI_CARGO_TOML_PATH: &str = "owmods_gui/backend/Cargo.toml";
|
||||
@ -17,10 +16,15 @@ pub fn disable_updater() -> Result<()> {
|
||||
// Cargo.toml
|
||||
let cargo_toml = std::fs::read_to_string(GUI_CARGO_TOML_PATH)?;
|
||||
let mut cargo_toml = cargo_toml.parse::<Document>()?;
|
||||
let mut features = cargo_toml["dependencies"]["tauri"]["features"].as_array_mut().unwrap();
|
||||
let mut features = cargo_toml["dependencies"]["tauri"]["features"]
|
||||
.as_array_mut()
|
||||
.unwrap();
|
||||
features.retain(|f| f.as_str().unwrap() != "updater");
|
||||
// Write to files
|
||||
std::fs::write(GUI_TAURI_CONF_PATH, serde_json::to_string_pretty(&tauri_conf)?)?;
|
||||
std::fs::write(
|
||||
GUI_TAURI_CONF_PATH,
|
||||
serde_json::to_string_pretty(&tauri_conf)?,
|
||||
)?;
|
||||
std::fs::write(GUI_CARGO_TOML_PATH, cargo_toml.to_string())?;
|
||||
|
||||
println!("Refetching dependencies...");
|
||||
|
||||
@ -2,17 +2,16 @@ use std::path::PathBuf;
|
||||
|
||||
use anyhow::Result;
|
||||
use cli_tasks::{generate_cli_pkg_build, generate_completions, generate_man_files, print_version};
|
||||
use gui_tasks::generate_gui_pkg_build;
|
||||
use gui_disable_updater::disable_updater;
|
||||
use gui_tasks::generate_gui_pkg_build;
|
||||
use regex::RegexBuilder;
|
||||
|
||||
mod cli_tasks;
|
||||
mod gui_tasks;
|
||||
mod gui_disable_updater;
|
||||
mod gui_tasks;
|
||||
mod log_client;
|
||||
mod log_spammer;
|
||||
|
||||
|
||||
pub fn get_out_dir() -> Result<PathBuf> {
|
||||
let out_dir = std::path::PathBuf::from(std::env::var_os("CARGO_MANIFEST_DIR").unwrap())
|
||||
.parent()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user