8000 Remove unnecessary extern crate declarations by curiousleo · Pull Request #271 · target/lorri · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Oct 15, 2022. It is now read-only.

Remove unnecessary extern crate declarations #271

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

curiousleo
Copy link
Collaborator
@curiousleo curiousleo commented Jan 7, 2020

Overview

100% refactoring: in Rust 2018, extern crate is almost never necessary. So we delete those declarations we don't need.

Checklist

  • Tested the change (unit or integration tests) [project still compiles, tests still pass]

@@ -324,7 +324,7 @@ fn parse_evaluation_line<T>(line: T) -> LogDatum
where
T: AsRef<OsStr>,
{
lazy_static! {
lazy_static::lazy_static! {
Copy link
Collaborator Author
@curiousleo curiousleo Jan 7, 2020

Choose a reason for hiding this comment

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

My heuristic here was: if a macro is only ever used once, then call it directly using its fully qualified name and remove the #[macro_use] extern crate declaration.

@grahamc grahamc merged commit 7b84837 into target:master Jan 7, 2020
@curiousleo curiousleo deleted the cleanup-extern-crate branch January 27, 2020 15:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0