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

Chore: ran cargo clippy --fix #509

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

martinfrances107
Copy link
Contributor

@martinfrances107 martinfrances107 commented Oct 17, 2023

Also ran cargo fmt.

After inspecting all the changes,

There is one case where we can remove a .clone() call, but it is not in a hot path, so the significance is low.

-        let end = start.clone() + Duration::nanoseconds(100);
+        let end = start + Duration::nanoseconds(100);

There a lots of cases where we can remove a cast for example.

-                total_ns as u64,
+                total_ns,

Also ran cargo fmt.

After inspecting all the changes,

There is one case where we can remove a .clone() call, but it is not in
a hot path, so the significance is low.

-        let end = start.clone() + Duration::nanoseconds(100);
+        let end = start + Duration::nanoseconds(100);

There a lots of cases where we can remove a cast for example.

-                total_ns as u64,
+                total_ns,
Copy link
Member

@AaronErhardt AaronErhardt left a comment

Choose a reason for hiding this comment

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

Thanks, looks good.

@AaronErhardt AaronErhardt merged commit 7c4ed88 into plotters-rs:master Oct 17, 2023
18 checks passed
@martinfrances107 martinfrances107 deleted the clippy branch October 17, 2023 11:46
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