Skip to content

Conversation

@hvitved
Copy link
Contributor

@hvitved hvitved commented Feb 6, 2025

Like #18656, but for constructions instead of destructions.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Feb 6, 2025
@hvitved hvitved force-pushed the rust/shorthand-struct branch from dea88a0 to 1685a34 Compare February 6, 2025 13:40
@hvitved hvitved force-pushed the rust/shorthand-struct branch from 1685a34 to 707bf16 Compare February 6, 2025 18:19
@hvitved hvitved marked this pull request as ready for review February 7, 2025 07:54
@hvitved hvitved requested review from Copilot and paldepind February 7, 2025 07:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This pull request introduces shorthand record construction in the Rust dataflow tests to simplify variable assignment and improve readability. Key updates include the introduction of a local variable "y" and the use of a shorter struct field initialization syntax for "plane".

  • Declares a local variable "y" by calling the "source" function
  • Replaces the inline "source(93)" call with "y" in the "Point" struct initialization

Changes

File Description
rust/ql/test/library-tests/dataflow/local/main.rs Uses a local variable for record initialization, simplifying the struct field assignment logic

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

Copy link
Contributor

@paldepind paldepind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hvitved hvitved merged commit d8c9427 into github:main Feb 7, 2025
16 checks passed
@hvitved hvitved deleted the rust/shorthand-struct branch February 7, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants