#Cow for attachments

1 messages · Page 1 of 1 (latest)

fickle citrus
#

re #1923

#

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

cobalt mica
#

I think I made them Cow for some update in the past but it may have been scrapped before we merged it

fickle citrus
#

separating the models into incoming and outgoing

#

plays into this

#

and actually naming them differently

#

i should look into why we scrapped it

cobalt mica
#

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

fickle citrus
#

it didnt make sense at the time

cobalt mica
fickle citrus
#

o

cobalt mica
#

This was where I introduced it

fickle citrus
#

i was the one who took the cows away

#

sadly

cobalt mica
#

🐄

true stone
#

@spice tiger ?

spice tiger
#

Sorry for the drama, here's a patch that trivially makes &'a [u8] work

fickle citrus
#

i agree with this change

cobalt mica
#

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
}
fickle citrus
#

oh okay

#

i see

spice tiger
#

But I won't hold up the PR

cobalt mica
#

Or do you mean a refractor on the users end?

spice tiger
#

on the user's end