-
Notifications
You must be signed in to change notification settings - Fork 48
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
Minor cleanup, resolve some Clippy lints #155
Commits on Apr 12, 2024
-
Add explicit anonymous lifetime parameters
Implicit elision of type lifetime parameters is deprecated, as per the rust-2018-idioms warning.
Configuration menu - View commit details
-
Copy full SHA for 87dc2a5 - Browse repository at this point
Copy the full SHA 87dc2a5View commit details -
Clippy's needless_pass_by_value lint shows a couple functions that don't need to own their arguments. undeploy() in particular takes a 240-byte Options struct by value but, like deploy(), doesn't need mutable access.
Configuration menu - View commit details
-
Copy full SHA for 9567ba0 - Browse repository at this point
Copy the full SHA 9567ba0View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2aac81 - Browse repository at this point
Copy the full SHA f2aac81View commit details -
Simplify @ binding in DryRunFilesystem::copy_file()
Clippy's unnested-or-patterns lint caught this.
Configuration menu - View commit details
-
Copy full SHA for 9edf99e - Browse repository at this point
Copy the full SHA 9edf99eView commit details -
Merge identical match arms in FileTarget::condition()
Clippy's match-same-arms lint caught this. The previous two functions already used or-patterns like this, but condition() was overlooked.
Configuration menu - View commit details
-
Copy full SHA for 8273e0d - Browse repository at this point
Copy the full SHA 8273e0dView commit details -
Remove unused &self from is_owned_by_user()
Clippy's unused-self lint caught this.
Configuration menu - View commit details
-
Copy full SHA for b5ca7a8 - Browse repository at this point
Copy the full SHA b5ca7a8View commit details -
Add backtick formatting to set_owner() docs
Clippy's doc-markdown lint caught this.
Configuration menu - View commit details
-
Copy full SHA for afc4b69 - Browse repository at this point
Copy the full SHA afc4b69View commit details -
Remove pointless clone from watch.rs
Due to being in a move closure, this clone captures opt by value and then clones it. This wouldn't work even if opt were used later in the enclosing scope and serves no purpose as it is.
Configuration menu - View commit details
-
Copy full SHA for e4ae24b - Browse repository at this point
Copy the full SHA e4ae24bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e086c1 - Browse repository at this point
Copy the full SHA 1e086c1View commit details -
Clippy's uninlined-format-args lint caught this.
Configuration menu - View commit details
-
Copy full SHA for b9acebb - Browse repository at this point
Copy the full SHA b9acebbView commit details -
Hoist else branch after bail!()
Clippy's redundant-else lint caught this.
Configuration menu - View commit details
-
Copy full SHA for 6f22f15 - Browse repository at this point
Copy the full SHA 6f22f15View commit details -
Add ; after assignment in FileTarget::set_path()
Rustfmt wants this broken due to line length and requires {} for multiline match arms, but doesn't insert a ; because it only sees syntax, not types. Clippy then complains (when pedantic) about the implicit () return. Clippy's clippy::semicolon-if-nothing-returned lint caught this.
Configuration menu - View commit details
-
Copy full SHA for dada9ca - Browse repository at this point
Copy the full SHA dada9caView commit details -
Remove redundant closure in config::tests
Clippy's redundant-closure lint caught this.
Configuration menu - View commit details
-
Copy full SHA for d1df781 - Browse repository at this point
Copy the full SHA d1df781View commit details -
Replaces `assert_eq!(x, [true|false])` with `assert!([x|!x])`. Clippy's bool-assert-comparison lint caught this.
Configuration menu - View commit details
-
Copy full SHA for a64e654 - Browse repository at this point
Copy the full SHA a64e654View commit details -
Fix compile error in handlebars_helpers tests
When testing without the `scripting` feature, compilation would fail because a `Configuration` was constructed assuming the `helpers` field always exists, but it only exists when `scripting` is enabled.
Configuration menu - View commit details
-
Copy full SHA for 7f942c1 - Browse repository at this point
Copy the full SHA 7f942c1View commit details -
Avoid mysterious
Default::default()
In `deploy::test::{low_level_simple, low_level_skip}`, `Default::default()` was used to construct a `BTreeMap`, with the only indication of the variable's type being the signature of `RealActionRunner::new()`, which it was passed by reference to. Clippy's default-trait-access lint caught this.
Configuration menu - View commit details
-
Copy full SHA for 7b99955 - Browse repository at this point
Copy the full SHA 7b99955View commit details
Commits on Apr 13, 2024
-
Use
unwrap_err()
instead ofassert!(x.is_err())
This is less verbose and provides a more detailed panic message.
Configuration menu - View commit details
-
Copy full SHA for 3481667 - Browse repository at this point
Copy the full SHA 3481667View commit details -
Rename config.rs test module for consistency
`config::tests` was the only test module not named `test`.
Configuration menu - View commit details
-
Copy full SHA for 8ae4a9b - Browse repository at this point
Copy the full SHA 8ae4a9bView commit details