Guest User

Untitled

a guest
Dec 13th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. fn main() {
  2. let body_res: Result<String, String> = Ok(String::from("test"));
  3. let body: &str = match body_res {
  4. Ok(ref res) => res.as_str(),
  5. Err(_e) => "",
  6. };
  7. print!("{}", body);
  8. }
Add Comment
Please, Sign In to add comment