5

Add size-parameter to unecessary_box_returns by lukaslueg · Pull Request #10651...

 1 year ago
source link: https://github.com/rust-lang/rust-clippy/pull/10651
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Contributor

@lukaslueg lukaslueg

commented

Apr 16, 2023

edited by xFrednet

Fixes #10641

This adds a configuration-knob to the unecessary_box_returns-lint which allows not linting a fn() -> Box<T> if T is "large". The default byte size above which we no longer lint is 128 bytes (due to #4652 (comment), also used in #9373). The overall rational is given in #10641.


changelog: Enhancement: [unnecessary_box_returns]: Added new lint configuration unnecessary-box-size to set the maximum size of T in Box<T> to be linted
#10651

tgross35 reacted with hooray emoji

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK