fs write import

This commit is contained in:
Penelope Gwen 2025-09-19 23:51:30 -07:00
parent 433984ad45
commit 79fe64396f

View file

@ -1,4 +1,4 @@
use std::{env::consts, fs::{self, exists, DirBuilder}, io, ops::Sub, path::{Path, PathBuf}}; use std::{env::consts, fs::{self, exists, DirBuilder, write}, io, ops::Sub, path::{Path, PathBuf}};
use walkdir::WalkDir; use walkdir::WalkDir;
use image::{imageops::GaussianBlurParameters, DynamicImage}; use image::{imageops::GaussianBlurParameters, DynamicImage};
@ -88,7 +88,7 @@ pub fn lock_screen(config: &Config, mut sway_connection: Connection, force_bg_re
} }
} }
let new_json = json!(wp_hash_array); let new_json = json!(wp_hash_array);
let _ = std::fs::write::<PathBuf, String>(hashes_json_path, new_json.to_string()); let _ = write(hashes_json_path, new_json.to_string());
let mut gtklock_command = "exec echo gtklock".to_owned(); let mut gtklock_command = "exec echo gtklock".to_owned();
for a in gtklock_args { for a in gtklock_args {
gtklock_command = gtklock_command + " " + &a; gtklock_command = gtklock_command + " " + &a;