-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve readability of some fmt code examples #127363
Improve readability of some fmt code examples #127363
Conversation
/// "(1.987, 2.983)", | ||
/// format!("{}", Position { longitude: 1.987, latitude: 2.983, }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but why is the longitude displayed in front of the latitude? That's pretty misleading when using tuple notation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the way that positions are typically stored in databases, I remember being annoyed by some GIS system because I kept reading it backwards. Agreed that it's nicer to read as (lat, long)
.
@bors r+ rollup |
…adability, r=Amanieu Improve readability of some fmt code examples Some indent was weird. Some examples were too long (overall better to keep it to maximum 80 columns, but only changed the most outstanding ones). r? `@Amanieu`
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#127333 (Split `SolverDelegate` back out from `InferCtxtLike`) - rust-lang#127363 (Improve readability of some fmt code examples) - rust-lang#127366 (Use `ControlFlow` results for visitors that are only looking for a single value) - rust-lang#127368 (Added dots at the sentence ends of rustc AST doc) - rust-lang#127369 (Match ergonomics 2024: align with RFC again) - rust-lang#127382 (Use verbose style when suggesting changing `const` with `let`) - rust-lang#127383 (Use verbose style for argument removal suggestion) r? `@ghost` `@rustbot` modify labels: rollup
…adability, r=Amanieu Improve readability of some fmt code examples Some indent was weird. Some examples were too long (overall better to keep it to maximum 80 columns, but only changed the most outstanding ones). r? ``@Amanieu``
…kingjubilee Rollup of 11 pull requests Successful merges: - rust-lang#123600 (impl PathBuf::add_extension and Path::with_added_extension) - rust-lang#126987 (out_of_scope_macro_calls: Detect calls inside attributes more precisely) - rust-lang#127107 (Improve dead code analysis) - rust-lang#127221 (Improve well known value check-cfg diagnostic for the standard library) - rust-lang#127333 (Split `SolverDelegate` back out from `InferCtxtLike`) - rust-lang#127363 (Improve readability of some fmt code examples) - rust-lang#127366 (Use `ControlFlow` results for visitors that are only looking for a single value) - rust-lang#127368 (Added dots at the sentence ends of rustc AST doc) - rust-lang#127369 (Match ergonomics 2024: align with RFC again) - rust-lang#127383 (Use verbose style for argument removal suggestion) - rust-lang#127393 (Remove clubby789 from review rotation) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 8 pull requests Successful merges: - rust-lang#123600 (impl PathBuf::add_extension and Path::with_added_extension) - rust-lang#127107 (Improve dead code analysis) - rust-lang#127221 (Improve well known value check-cfg diagnostic for the standard library) - rust-lang#127333 (Split `SolverDelegate` back out from `InferCtxtLike`) - rust-lang#127363 (Improve readability of some fmt code examples) - rust-lang#127366 (Use `ControlFlow` results for visitors that are only looking for a single value) - rust-lang#127368 (Added dots at the sentence ends of rustc AST doc) - rust-lang#127393 (Remove clubby789 from review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127363 - GuillaumeGomez:improve-fmt-code-readability, r=Amanieu Improve readability of some fmt code examples Some indent was weird. Some examples were too long (overall better to keep it to maximum 80 columns, but only changed the most outstanding ones). r? ```@Amanieu```
@bors r- |
Some indent was weird. Some examples were too long (overall better to keep it to maximum 80 columns, but only changed the most outstanding ones).
r? @Amanieu