mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 17:20:49 +00:00
Avoid updating users when the user id itself changed
This commit is contained in:
parent
fad84b9420
commit
5c523009e1
5 changed files with 73 additions and 22 deletions
|
@ -88,6 +88,8 @@ pub mod prelude_commands {
|
|||
}
|
||||
|
||||
mod debugging_ok {
|
||||
use std::backtrace::{Backtrace, BacktraceStatus};
|
||||
|
||||
pub trait OkPrint {
|
||||
type Output;
|
||||
fn pls_ok(self) -> Option<Self::Output>;
|
||||
|
@ -101,6 +103,10 @@ mod debugging_ok {
|
|||
Ok(v) => Some(v),
|
||||
Err(e) => {
|
||||
eprintln!("Error: {:?}", e);
|
||||
let captures = Backtrace::capture();
|
||||
if captures.status() == BacktraceStatus::Captured {
|
||||
eprintln!("{}", captures);
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue