How do I avoid "temporary value created here" errors when creating an array?

Making good progress! Yes, the "can't use a reference as a temp value" makes perfect sense now!

My last port was of a bash script, which was interesting. I decided to port some C next, so I think I'll port some of Apple's (BSD) shell_cmds. Maybe I should just start with yes and true :slight_smile:

It's probably of no value to anyone else, but if anyone wants to join in the porting fun, let me know. Since it's just for learning, I would be fine granting commit access to anyone who wants to play. GitHub - agileperception/shell_cmds: Rust port of Apple's shell_cmds (sleep, seq, yes, etc.) I think I'll make a new post just inviting people to come play. Rust is so fun.

DISCLAIMER: I just got out of surgery, and I'm heavily medicated. I am reading through my post(s) about ten times before submitting, but if any incoherency leaks through...just enjoy the ride.

Maybe have a look at core-utils?
They already have a framework you could start in. Also, contributing there means you have a community to talk with, and your learning experience benefits the world!

Get well soon :ambulance: :head_bandage:

1 Like

And now I have as well! Nice! This Rust forum is my first experience with this particular forum software. I'm really liking it so far. Rust syntax highlighting is especially nice.

Hmm. My current objective is to have fun learning Rust by porting simple stuff from another language in a toy project I don't have to stress about (because no one will ever use it). core-utils only has the toughest bits left to do and looks serious, stressful business. I can just punt and come here for the community part of my toy project. :wink:

I get the subtext, though. No one is going to come play with me because if they wanted to work on porting command-line utilities, they would go to the awesome project that's doing it for reals. That's okay! One day I'll find my rainbow connection (if you click the link, you're obligated to sing along like I did).

Thanks! Last night was terrible, but I'm already feeling better today than I was yesterday. Getting the anesthesia out of my system definitely helps.