Skip to content

Commit

Permalink
chore: Update latest_script variable assignment in main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
arloor committed May 7, 2024
1 parent e650f88 commit 747ffeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>>{
//如果是linux,且生成的脚本产生变化,则写到文件,并且执行
if script != latest_script {
info!("nftables脚本如下:\n{}", script);
latest_script = script.clone();
latest_script.clone_from(&script);
if cfg!(target_os = "linux") {
let f = File::create("/etc/nftables/nat-diy.nft");
if let Ok(mut file) = f {
Expand Down

0 comments on commit 747ffeb

Please sign in to comment.