0

Hey so I was wondering is there any way to parse a variable as 1 argument? I'm trying to copy a file into a logs folder and it can only accept 2 arguments, not the 3 I need.

If not do you know of any other way I might be able to assign the output file the id variable?

I've looked in all the documentation i can find and i don't see a straightforward answer

std::fs::copy(id, "logs/{}",id); //this function takes 2 arguments but 3 arguments were supplied
Xanthus
  • 55
  • 1
  • 9
  • @ChayimFriedman Not quite sure i understand the material exactly; i tried "std::fs::copy(id, format!("/logs/{id}"));" and it didn't work. But I didn't get a compile error. – Xanthus May 22 '22 at 10:53
  • 1
    This is what you should do. It didn't work? You will have to expand a little more. But this is a matter for a new question. – Chayim Friedman May 22 '22 at 10:54

0 Answers0