-
Notifications
You must be signed in to change notification settings - Fork 210
fix clippy warning on non-linux systems #1455
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
Conversation
src/docbuilder/rustwide_builder.rs
Outdated
@@ -12,6 +12,7 @@ use crate::utils::{copy_dir_all, parse_rustc_version, CargoMetadata}; | |||
use crate::{db::blacklist::is_blacklisted, utils::MetadataPackage}; | |||
use crate::{Config, Context, Index, Metrics, Storage}; | |||
use docsrs_metadata::{Metadata, DEFAULT_TARGETS, HOST_TARGET}; | |||
#[cfg(target_os = "linux")] | |||
use failure::ResultExt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is only used below in a section that is only compiled on linux, so this use
is unused on all other platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move it into the function that uses it instead? That way the cfgs are automatically in sync instead of needing to update them in two places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it into the block that uses it, not sure if that is the most idiomatic way :)
( I can move it to the function if that's what is better)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, that's fine :) thanks!
507c69c
to
b00749f
Compare
b00749f
to
f84fa01
Compare
@jyn514 since @GuillaumeGomez fixed the clippy warnings in his own PR (#1457), I update this one to be only the non-linux warning. |
Thanks! |
No description provided.