Why is Iterator::find implemented the way it is?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • rust

    Empowering everyone to build reliable and efficient software.

  • The second is the use of fn check. This is much more esoteric and is primarily about controlling compile times and generated code size, due to shortcomings in the current monomorphization implementation. Basically, when you use a lambda (as would be expected), you end up with a lot of necessary generic parameters that result in a lot of extra versions of that function body being compiled. fn check, being an item, doesn't retain any generic context from its surrounding scope, so it only has to be compiled once for each it encounters. The relevant PR is here and it links out to plenty of discussions describing the problem and why it was solved this way.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts