Skip to content
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

Fix change in clippy rule from &Option<Type> to Option<&Type> #603

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

SteveL-MSFT
Copy link
Member

PR Summary

Clippy had a new rule where it's idiomatic to use Option<&Type> instead of &Option<Type> so that the contents of the Option are passed by reference instead of the Option wrapper.

The counter part of this is that you now need to use .as_ref() with an Option so that the contents are referenced.

Also fixed one missed arg from --format to --output-format

dsc/src/subcommand.rs Outdated Show resolved Hide resolved
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Dec 5, 2024
Merged via the queue into PowerShell:main with commit 47f2245 Dec 5, 2024
3 checks passed
@SteveL-MSFT SteveL-MSFT deleted the clippy-option branch December 5, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants