Guest User

Untitled

a guest
Nov 16th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. fn print_fct(d: &str) {
  2. println!("{}", d);
  3. }
  4.  
  5. fn test_fct1(text: &str) {
  6. let output = if true {
  7. text.to_string()
  8. } else {
  9. format!("something")
  10. };
  11.  
  12. print_fct(&output);
  13. }
  14.  
  15. fn main() {
  16. test_fct1("some text");
  17. }
Add Comment
Please, Sign In to add comment