arrayfire-rust icon indicating copy to clipboard operation
arrayfire-rust copied to clipboard

The scope of the unsafe block can be appropriately reduced

Open peamaeq opened this issue 2 years ago • 5 comments

peamaeq avatar May 18 '22 07:05 peamaeq

@peamaeq Please fix the commit message.

9prady9 avatar May 18 '22 08:05 9prady9

please also address the formatting and clippy issues

9prady9 avatar May 19 '22 02:05 9prady9

please also address the formatting and clippy issues

Sorry for the long reply, thanks

peamaeq avatar May 19 '22 08:05 peamaeq

please also address the formatting and clippy issues

Sorry for the long reply, thanks

I am not sure which long reply you are talking about. I was referring to the commit message "0517". What does that mean ? Can you put some readable text in the commit message.

9prady9 avatar May 19 '22 09:05 9prady9

please also address the formatting and clippy issues

Sorry for the long reply, thanks

I am not sure which long reply you are talking about. I was referring to the commit message "0517". What does that mean ? Can you put some readable text in the commit message.

I'm so sorry🤦‍♂️, '0517' is date. I'm really no expert with unsafe but my understanding is that you should choose the scopes as small as possible and such that any code outside of the unsafe block can't use it's results to cause havoc. Then people only have to look at these small unsafe blocks and as long as they consider them "safe" the whole code should be safe.

peamaeq avatar May 20 '22 02:05 peamaeq