Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn print_fct(d: &str) {
- println!("{}", d);
- }
- fn test_fct1(text: &str) {
- let output = if true {
- text.to_string()
- } else {
- format!("something")
- };
- print_fct(&output);
- }
- fn main() {
- test_fct1("some text");
- }
Add Comment
Please, Sign In to add comment