commit | 7e1489cf63b15dd12c34801ae434d3933c8ecb84 | [log] [tgz] |
---|---|---|
author | Matthias Krüger <matthias.krueger@famsik.de> | Tue Jun 25 21:33:44 2024 +0200 |
committer | GitHub <noreply@github.com> | Tue Jun 25 21:33:44 2024 +0200 |
tree | 9a0e1baf289f66ab30bf14bdad76428403d00320 | |
parent | 3795c56bd1ba32f99ccefb89f8b6111f89f5e87d [diff] | |
parent | c2f1072e013c3b58febab160b7f8759a21aaaf79 [diff] |
Rollup merge of #126932 - Zalathar:flat-pat, r=Nadrieril Tweak `FlatPat::new` to avoid a temporarily-invalid state It was somewhat confusing that the old constructor would create a `FlatPat` in a (possibly) non-simplified state, and then simplify its contents in-place. So instead we now create its fields as local variables, perform simplification, and then create the struct afterwards. This doesn't affect correctness, but is less confusing. --- I've also included some semi-related comments that I made while trying to navigate this code.
Website | Getting started | Learn | Documentation | Contributing
This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.
Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrate with other languages.
Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.
Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).
Read “Installation” from The Book.
If you really want to install from source (though this is not recommended), see INSTALL.md.
See https://www.rust-lang.org/community for a list of chat platforms and forums.
See CONTRIBUTING.md.
Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the “Rust Trademarks”).
If you want to use these names or brands, please read the media guide.
Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.