putz u in dhe washing machin and spins ur bsky pofile pictuer !!! :D
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

smol fixups

did:plc:73gqgbnvpx5syidcponjri… 65c8c057 b1f46ef1

verified
+3 -6
+3 -6
src/main.rs
··· 17 17 time::{SystemTime, UNIX_EPOCH}, 18 18 }; 19 19 20 + const STATE_FILE: &str = ".statefile"; 21 + 20 22 type AgentType = 21 23 Agent<CredentialSession<MemorySessionStore<SessionKey, AtpSession>, JacquardResolver>>; 22 24 23 25 fn write_state(angle: i32) { 24 - const STATE_FILE: &str = ".statefile"; 25 - 26 26 std::fs::write(STATE_FILE, angle.to_string()).unwrap_or_else(|e| { 27 27 eprintln!("failed to write state file '{}': {}", STATE_FILE, e); 28 28 // fine to not exit here like so what you'll do an extra upload who cares ··· 30 30 } 31 31 32 32 fn read_state() -> Option<i32> { 33 - const STATE_FILE: &str = ".statefile"; 34 33 let contents = std::fs::read_to_string(STATE_FILE).ok()?; 35 34 let angle: i32 = contents.trim().parse().ok()?; 36 35 Some(angle) ··· 182 181 process::exit(1); 183 182 }); 184 183 let image = reader.decode().unwrap_or_else(|e| { 185 - eprintln!("failed to decode '{}': {}", input_path.to_string(), e); 184 + eprintln!("failed to decode '{}': {}", input_path, e); 186 185 process::exit(1); 187 186 }); 188 187 ··· 193 192 return; 194 193 } 195 194 } 196 - 197 - let angle = compute_angle(); 198 195 let rotated = rotate_image(image, angle); 199 196 200 197 if let Some(out) = &output {