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

tidy: Cleanups and clippy warning fixes #53895

Merged
merged 15 commits into from Sep 7, 2018
Merged

Conversation

joshtriplett
Copy link
Member

This eliminates various clippy warnings in the tidy tool, as well as
making some related cleanups. These changes should not introduce any
functional differences.

Fixes the clippy "single_char_pattern" lint, and (marginally) improves
performance.
Fixes a clippy warning, and improves readability.
Use `.nth(n)` rather than `.skip(n).next()` (also fixes a clippy
warning), and use `.into()` and a type signature rather than
`PathBuf::from`.
Eliminates a clippy warning.

Also drop the unnecessary `.peekable()`.
…fetimes

Dropping the redundant lifetimes also eliminates a clippy warning.
This also eliminates a clippy warning.
Drop unnecessary .into_iter() (also fixing a clippy warning), and use
path functions to handle file extensions.
This makes the code more readable, and eliminates a clippy warning.
This improves readability and eliminates a clippy warning.
Use `if let` to simplify a match, and use `contains_key` instead of
`get`.
The match expression immediately below it checks the same condition.
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 2, 2018
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 4, 2018

📌 Commit a5c86fe has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Sep 7, 2018
tidy: Cleanups and clippy warning fixes

This eliminates various clippy warnings in the tidy tool, as well as
making some related cleanups. These changes should not introduce any
functional differences.
bors added a commit that referenced this pull request Sep 7, 2018
Rollup of 17 pull requests

Successful merges:

 - #53299 (Updated core/macros.rs to note it works in a no_std environment.)
 - #53376 (Cross reference io::copy and fs::copy in docs.)
 - #53455 (Individual docs for {from,to}_*_bytes)
 - #53550 (librustc_lint: In recursion warning, change 'recurring' to 'recursing')
 - #53860 (Migrate (some) of run-pass/ to ui)
 - #53874 (Implement Unpin for Box, Rc, and Arc)
 - #53895 (tidy: Cleanups and clippy warning fixes)
 - #53946 (Clarify `ManuallyDrop` docs)
 - #53948 (Minimized clippy test from when NLL disabled two-phase borrows)
 - #53959 (Add .git extension to submodule paths missing it)
 - #53966 (A few cleanups and minor improvements to mir/dataflow)
 - #53967 (propagate build.python into cmake)
 - #53979 (Remove `#[repr(transparent)]` from atomics)
 - #53991 (Add unchecked_shl/shr check for intrinsics to fix miri's test suit)
 - #53992 (migrate run-pass/borrowck to ui/run-pass)
 - #53994 (migrate run-pass/*/ to ui/run-pass)
 - #54023 (update clippy submodule)
@bors bors merged commit a5c86fe into rust-lang:master Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants