the.bay.news

Make code portable between platforms

The Rust Programming Language Forum
Make code portable between platforms
I'm implementing a file manager. It supposes to work on Windows and Linux. Since Windows file system doesn't care about cases of characters of path names, I convert all names in upper case on Windows. So I use a conditional compilation to handle that. However, I do not know how to make it concise and clear and asked AI for that. It answered like: Concise takeaway Use the second version. It keeps the control‑flow simple: On Windows → define mut filename and uppercase it On non‑Windows → defin...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.