5 comments

  • edelbitter41 minutes ago
    <i>Cloudflare</i> does not notice (until a customer complains) that they are sending broken responses at scale? I would have thought they would notice this from sampling and linting a few replies.. just in case they did something like Cloudbleed again.
  • 100ms2 minutes ago
    [flagged]
  • nopurpose5 minutes ago
    [dead]
  • giammbo14 minutes ago
    [flagged]
  • logicchains39 minutes ago
    How does terrible code like this survive so long in such a key piece of infrastructure:<p><pre><code> let _ = self.poll_read(cx)?; let _ = self.poll_write(cx)?; let _ = self.poll_flush(cx)?; </code></pre> Surely at the very least a linter should have flagged that the return values aren&#x27;t handled.
    • lifthrasiir13 minutes ago
      It is an <i>explicit</i> way to discard return values; `self.poll_read(cx)?` etc. alone would warn. Or in this case, `Poll&lt;Result&lt;(), Error&gt;&gt;` is unwrapped once and `Result&lt;(), Error&gt;` is being discarded. The decision to discard `Result&lt;(), Error&gt;` should have been intentional, albeit turned out to be not always the case.
    • QuantumNomad_11 minutes ago
      Assigning to _ in Rust specifically means that you intentionally want to discard the value, and the clippy linter and the Rust compiler both know that.
    • 3form29 minutes ago
      Well, simple. You write a project without a linter, so as to be fast. Or on minimal settings. Then one day you turn it on and end up with 10k warnings at max checks. You ignore them and tune it down to a bearable level. Problem solved.<p>That, or the linter sucks (or the idiom is too popular to be linted against, so then it&#x27;s more of a language issue).