-
Notifications
You must be signed in to change notification settings - Fork 25
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
chore: import in macro body for improved readablity #1462
chore: import in macro body for improved readablity #1462
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @ArniStarkware and the rest of your teammates on Graphite |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1462 +/- ##
==========================================
- Coverage 74.18% 70.17% -4.02%
==========================================
Files 359 95 -264
Lines 36240 13039 -23201
Branches 36240 13039 -23201
==========================================
- Hits 26886 9150 -17736
+ Misses 7220 3489 -3731
+ Partials 2134 400 -1734
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware, @dorimedini-starkware, and @MohammadNassar1)
a discussion (no related file):
How come no imports are removed from files that use these macros?
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware, @elintul, and @MohammadNassar1)
a discussion (no related file):
Previously, elintul (Elin) wrote…
How come no imports are removed from files that use these macros?
In this PR we do not remove any "imports". In this set of macros the path to the structs was already used in the macro.
The goal of this PR is to make these macros more readable (by using the use
inside the macro technology).
The goal was to make this less readable lines like this one:
if let cairo_vm::vm::errors::vm_errors::VirtualMachineError::Hint(hint) = $inner_exc {
if let cairo_vm::vm::errors::hint_errors::HintError::Internal(
cairo_vm::vm::errors::vm_errors::VirtualMachineError::Other(error),
) = &hint.1
into
if let VirtualMachineError::Hint(hint) = $inner_exc {
if let HintError::Internal(VirtualMachineError::Other(error)) = &hint.1
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware, @dorimedini-starkware, and @MohammadNassar1)
a discussion (no related file):
Previously, ArniStarkware (Arnon Hod) wrote…
In this PR we do not remove any "imports". In this set of macros the path to the structs was already used in the macro.
The goal of this PR is to make these macros more readable (by using theuse
inside the macro technology).The goal was to make this less readable lines like this one:
if let cairo_vm::vm::errors::vm_errors::VirtualMachineError::Hint(hint) = $inner_exc { if let cairo_vm::vm::errors::hint_errors::HintError::Internal( cairo_vm::vm::errors::vm_errors::VirtualMachineError::Other(error), ) = &hint.1
into
if let VirtualMachineError::Hint(hint) = $inner_exc { if let HintError::Internal(VirtualMachineError::Other(error)) = &hint.1
Not sure I understand.
This PR may cause longer compilation times. |
No description provided.