mirror of
https://github.com/egor-white/zaprett.git
synced 2025-12-10 13:30:23 +05:00
dereference in wrong place
This commit is contained in:
@@ -53,7 +53,7 @@ impl Command {
|
||||
);
|
||||
}
|
||||
Command::SetAutostart { autostart } => {
|
||||
if let Err(err) = set_autostart(autostart).await {
|
||||
if let Err(err) = set_autostart(*autostart).await {
|
||||
error!("Failed to set auto start: {err}")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@ pub static DEFAULT_START: &str = "
|
||||
--filter-udp=443 --dpi-desync=fake --dpi-desync-repeats=6 $hostlist
|
||||
";
|
||||
|
||||
async fn set_autostart(autostart: &bool) -> Result<(), anyhow::Error> {
|
||||
async fn set_autostart(autostart: bool) -> Result<(), anyhow::Error> {
|
||||
let autostart_path = MODULE_PATH.join("autostart");
|
||||
|
||||
if *autostart {
|
||||
if autostart {
|
||||
File::create(autostart_path).await?;
|
||||
} else {
|
||||
fs::remove_file(autostart_path).await?;
|
||||
|
||||
Reference in New Issue
Block a user