Add Rust Array to Copy Special#9088
Add Rust Array to Copy Special#9088CUB3D wants to merge 1 commit intoNationalSecurityAgency:masterfrom
Conversation
|
Is something like |
|
I did consider that but from looking at the existing options, decided against it. All of the current options copy an expression that can be used directly in a function argument, struct definition, etc. By including a type specifier like that it can only be used as a variable definition, and importantly if the type specifier is removed will change the type of the array from I could change this to only add the |
Your original format is probably best. That way if the user wants to modify the array they don't have to worry about breaking the type info if they remove the first element. |
|
A second question... your PR comes right as I'm in the middle of converting all the copyspecial logic for each format into standalone pluggable extensionpoints. Each format will wind up in their own class (something like XYZFormatClipboardFormatHandler). If we pull your PR in now, your feature will be preserved, but your author info will be lost when the logic gets moved into a different file by me. |
Adds a new option to "Copy Special" to copy the selection as a Rust
u8array. This is similar to the Python List format, with the addition of au8postfix to each element. This ensures correct typing, as by default Rust will assumei32for an integer array.Produces output like so:
[ 0x8bu8, 0x1cu8, 0x24u8, 0xc3u8 ]