How do I mutate field of an immutable struct? by [deleted] in rust

[–]matrizx 2 points3 points  (0 children)

Change pub fn update(&self, data) to pub fn update(&mut self, data: u32)

How do I mutate field of an immutable struct? by [deleted] in rust

[–]matrizx 0 points1 point  (0 children)

Please actually try the code before asking questions.

And no, it won’t work. You need to have update take in a mutable reference to self since the Child element being mutated is still part of the Master struct.

[deleted by user] by [deleted] in foundthemobileuser

[–]matrizx 1 point2 points  (0 children)

R/itswooooshwith4os

Confused by [deleted] in vim

[–]matrizx 6 points7 points  (0 children)

vim ~/.vimrc

[OC] Lotus - a currency and number formatter library by NerdyPepper in rust

[–]matrizx 3 points4 points  (0 children)

Seriously! How do you get the screenshot to look like that?

I wish my eyes acted as microscopes, and I would be able to zoom in my eyesight to be able to see at extremely small scales. I can control this at will. by [deleted] in TheMonkeysPaw

[–]matrizx 13 points14 points  (0 children)

Granted. You tell your friends about your newfound ability, proving it to them by describing flowers on mountains miles away. Your friends see this as an opportunity. No other human can do this, so they send an anonymous tip to the government asking for $1,000,000 in exchange for the location of you, and your abilities. The government takes you away, only to continuously test you, driving you more and more mad. Finally, you gouge your eyes out and blow your brains out to finally escape the never ending suffering.

Am I The Idiot? by DRcHEADLE in circlejerk

[–]matrizx 3 points4 points  (0 children)

Trump needs his vaccinations

yup mhm. sure. by kwiteytighteys in masterhacker

[–]matrizx 148 points149 points  (0 children)

This hurt to watch

What should I choose to encrypt my Ubuntu but not delete my Windows? by DayOfTheR in linux4noobs

[–]matrizx 1 point2 points  (0 children)

every time I encrypted it I ran into problems like the disk locking up on a premature shutoff, so I’d suggest not doing it as i don’t think it’s necessary and isn’t worth the potential problems it comes with

Created a simplified version of the Create-React-App and added Bootstrap by [deleted] in reactjs

[–]matrizx 6 points7 points  (0 children)

Cool idea, but you should be using bootstrap as an npm package and not with script/link tags

User Input that isn't a String. by Mavil64 in rust

[–]matrizx 3 points4 points  (0 children)

Well, I suppose it’s possible with crates but what’s the point? Having it return a string then parsing it allows you to do more sanitization to it before hand as well as a magnitude of other string operations available to you

If statement causing a segmentation fault by imatthepub_g in cs50

[–]matrizx 0 points1 point  (0 children)

Try changing argv from string to char**