User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
the http crate can redacted my redacted rn
❤️2
3
1
9
2

User avatar
[4FBB09] @5225225@furry.engineer
1mo
@star hi im the http crate

also whats up

ive worked with it a
bit
:celeste_hearts_lesbian:1:hehehe:1
1
0
1
2
User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
0
0
0
0
User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
-> ErrorKind isn't pub and has no accessors. Meaning, if you were to want to try and find out why exactly parsing your str into a Uri failed, you have no way to do so programmatically.
❤️1
3
0
6
1
User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
and with no accessors, I mean no From or TryFrom conversions I could find, either
❤️1
1
0
2
1
User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
this is buuuuuulllllllshiiiiiiiiiiiiiiiiiiiiiiiiiiiiit
0
0
4
0
User avatar
[4FBB09] @5225225@furry.engineer
1mo
@star ... matching on Display output?

hacky but...

looks like there's an open issue for it
github.com/hyperium/http/issues/188 and the reasons to not do it (MSRV) aren't relevant anymore, so maybe no one's gotten around to it I Guess.
3
0
1
0
User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
@5225225 i'm going to scream 😭
1
0
1
0
User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
@5225225
I don't think we would expose the ErrorKind enum publicly, because it prevents adding new variants, or changing them around
yeah i really hate it when on a friday afternoon i have nothing to do and just feel like changing Uri error types around or adding new variants because suddenly there are somehow new and exciting ways to fuck up a Uri and also I am a rust programmer who is scared of large numbers (such as 2) as the major version number for my crate. everyone knows how that feels
2
0
3
0
User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
@5225225 meanwhile unbothered javascript royalties ers on version 28 of their runtime and leftpad v1032.12.1 in their package.json
1
0
1
0
User avatar
solo @solonovamax@tech.lgbt
1mo
@star @5225225 node is now version 26, electron is version 44, and v8 is version 15
0
0
0
0
User avatar
[4FBB09] @5225225@furry.engineer
1mo
@star to be fair for a foundational crate that shows up in API surface it is annoying to get "oh, you're passing a v1 http::Uri but you need a v2 http::Uri!!! get fucked :)

yeah there's some workarounds for that

idk if javascript gives a shit about type versions like that, probably not
1
0
0
0
User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
@5225225 it's just bad api design
0
0
0
0
User avatar
minwlfNotice flori_ava_star~cursor_blinking @star@amazonawaws.com
1mo
@5225225 behold, this fucking shitty way to do "if the str has no uri scheme, assume https":
pub fn new(input: &str) -> Result<Self, NamespaceError> {

        match Uri::from_str(input) {

            Ok(uri) => Ok(Self(uri)),

            Err(err) => Uri::from_str(&format!("https://{input}"))

                .map_err(|_| NamespaceError::InvalidUri(err))

                .map(Self),

        }

    }
0
1
3
0
User avatar
JCM @jcm@wafrn.jcm.re
1mo
slightly off-topic, silly @5225225 @star

>
matching on Display output?



still less cursed than what C++ programmers have to do to get a universal enum to string :P
0
0
0
0
User avatar
Schrottkatze @schrottkatze@treehouse.systems
1mo
flirt 100 @star can i redacted your redacted 🥺
0
0
0
0