Add non-panicy error handling for local pins
This commit is contained in:
parent
a549c89c33
commit
8b3e6a8380
1 changed files with 8 additions and 2 deletions
10
src/main.rs
10
src/main.rs
|
@ -141,7 +141,10 @@ impl Bot {
|
|||
auth: self.auth.clone()
|
||||
};
|
||||
|
||||
let _ = self.pin(remove_local_pin);
|
||||
match self.pin(remove_local_pin) {
|
||||
Ok(_) => {},
|
||||
Err(e) => println!("Error Unpinning Post: {:#?}", e)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +164,10 @@ impl Bot {
|
|||
auth: self.auth.clone(),
|
||||
};
|
||||
|
||||
let _ = self.pin(pin_new_local);
|
||||
match self.pin(pin_new_local) {
|
||||
Ok(_) => {},
|
||||
Err(e) => println!("Error Pinning Post: {:#?}", e)
|
||||
};;
|
||||
|
||||
return Ok(());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue