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

Remove unnecessary bounds #59

Merged
merged 3 commits into from
Mar 3, 2021

Conversation

zeegomo
Copy link
Contributor

@zeegomo zeegomo commented Feb 28, 2021

No description provided.

@zeegomo zeegomo force-pushed the remove-unnecessary-bounds branch from 2357818 to 8d0a46f Compare March 1, 2021 11:47
zeegomo added 2 commits March 1, 2021 12:48
Mutex already provides a Sync implementation for types that are
Send, and those types are never taken out of the Mutex, so that
bound is unnecessary.
src/load/mod.rs Outdated
@@ -20,7 +20,7 @@ pub use stats::Stats;
pub use status::{RequestStatusProvider, Status, StatusUpdaterThread};

pub fn start_sync(
request_generator: impl RequestGenerator + Clone + Send + Sized + 'static,
request_generator: impl RequestGenerator + Send + Sized + 'static,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think Sized is unnecessary here as well, use of the type in the by-value parameter implies Sized.

Copy link
Contributor

Choose a reason for hiding this comment

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

Stylistically, this is a better case for old-school generic parameters and a where clause.

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