#Cow for attachments
1 messages · Page 1 of 1 (latest)
i like this idea, but i am also seeing the need for a better rework of the http module in general
so we can do this for 0.14 but i think for 0.15 we need to strive for a better design overall
I think I made them Cow for some update in the past but it may have been scrapped before we merged it
separating the models into incoming and outgoing
plays into this
and actually naming them differently
i should look into why we scrapped it
It was mostly done as a way to make it backwards compatible so we scrapped it when it was no longer needed if memory serves me right
it didnt make sense at the time
o
This was where I introduced it
🐄
@spice tiger ?
i agree with this change
Using slices instead of cows makes some things impossible to do
For example it will not be possible to make a function that adds a file to it while the function itself owns the file
fn add_file(message: CreateMessage, path: &str) -> CreateMessage {
// something like this where it loads the file and adds it as a
// attachment is not possible with a slice
}
this can be worked around through refactoring
But I won't hold up the PR
Not without ending up cloning the date
Or do you mean a refractor on the users end?
on the user's end