use std::fs; fn main() -> std::io::Result<()> { fs::rename("example.txt", "renamed.txt")?; println!("File renamed successfully!"); Ok(()) }