diff --git a/src/main.rs b/src/main.rs index 1183048..879e63c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,7 +89,7 @@ fn main() { while let Some(edit_code) = edit_codes.next() { match edit_paste(&client, &csrf_data, &edit_code, PASTE_NAME) { Ok(_) => { - println!("Success, found edit code: {edit_code}"); + println!("Paste deleted successfully with edit code: {edit_code}"); return; } Err(e) => match e { diff --git a/src/rentry.rs b/src/rentry.rs index e9496f4..58ee54c 100644 --- a/src/rentry.rs +++ b/src/rentry.rs @@ -150,7 +150,7 @@ pub fn edit_paste( if res.status().is_redirection() { let location = res.headers().get("Location").unwrap().to_str().unwrap(); - if location == "/".to_owned() + paste_name { + if location == "/" { return Ok(()); } }