• 1 Post
  • 70 Comments
Joined 1 year ago
cake
Cake day: November 24th, 2023

help-circle
  • I wouldn’t mind having a explanation of what you want to do instead of the code. It’s not quite clear what you mean.

    Anyways, what you want is to transform an iterator (your Select) into an iterator of Option<String>?

    For that, there’s multiple ways but here’s the simplest:

    link_nodes.map(|node| node.value().attr("href").to_string())

    Essentially, for each elements, we execute a closure (arrow function in JavaScript) that transform the node into your href string.

    P.S. can’t guarantee it works, I don’t know what this “Select” type is, and I’m programming on mobile











  • There’s a difference between helping people with misunderstanding a tool and belittling them for being wrong. It’s just a matter of wording that separate an helpful answer from a toxic one

    I could tell you “You should actually use Y instead of X. They are numerous benefits like A, B and C. The doc actually have a great example you may have missed or not understood it was for this purpose. It will help you a lot more than what you are thinking of doing.” And this would be fine.

    But “Just use Y. X is bad because Y is made for that. You not willing to use Y shouldn’t make you do X. There’s even a the first Google link on how to do it” isn’t fine.

    And I have not belittled them at all. I have said that it wasn’t what I was looking for. A lot of times people post questions they think should solve their issue, but only to realise that they didn’t fully understand the full picture and theirs problem is on a larger scale.





  • RustyNova@lemmy.worldOPtoSelfhosted@lemmy.worldRestart an OOM killed docker automatically
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    6
    ·
    edit-2
    4 months ago

    Alright, sorry for calling it a “bandaid fix”. It wasn’t just the right term for what I wanted to say. I was more referring on how it would only fix issues in cases of builds, and not on actual runtime, which can also be an issue if I am not careful. So yeah, it’s the fix for the issue in the post, but this solution made me realise that this isn’t the only thing I want.

    But the second part is… Just chill. It’s a home server. Not a high availability cluster. I can afford stupid things. Heck, I’m only asking this question because I got stupid and haven’t limited the job count of a cargo build, downing my server. I don’t care that my build crash. I just want to not have to manually restart it, because when I’m not here I can’t do it.

    As for the link that you sent, it’s container limitations, not image building limitations. And I already have setup some on my most hungry container, stats shown that it blew past it, so idk what’s going on there.

    Edit: NVM. This is a bandaid fix. What if you forgot to put the flag? Like it’s been 5 month since last time and forgot to do the same fix? Or you accidentally removed it while editing the command? I’m actually looking for a solution that fixed my problem fully, not a partial solution







  • I would do that… If CI wouldn’t be set to -D warnings

    Who even does that? Oh wait, it was me.

    Joke aside, it does help to keep the code clean, even more for open source projects where multiple separate people may all have their own codding style, and it helps make it easier to organise.

    But I do agree that it can be really, really annoying.