Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. let application = match request.guard::<Application>() {
  2. Success(app) => app,
  3. _ => return Outcome::Failure((RocketStatus::BadRequest, ()))
  4. };
  5.  
  6. // to this
  7. let application = request.guard::<Application>()?;
  8.  
  9.  
  10. // as I understand it, you should be able to implement a trait for this? But I don't know which one and I've tried several with tens of errors :/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement