Skip to content

Commit

Permalink
Merge pull request volta-cli#940 from charlespierce/clippy_warnings
Browse files Browse the repository at this point in the history
Fix clippy warnings, formatting, and M1 build
  • Loading branch information
charlespierce committed Feb 14, 2021
2 parents 42c30cf + bff97c4 commit 176e057
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/build-for-arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

echo "Building Volta"

SDKROOT=$(xcrun -sdk macosx11.0 --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=11.0 cargo build --release --target=aarch64-apple-darwin
SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=11.0 cargo build --release --target=aarch64-apple-darwin

echo "Packaging Binaries"

Expand Down
1 change: 1 addition & 0 deletions crates/volta-core/src/tool/node/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ impl From<RawNodeIndex> for NodeIndex {
}
}

#[allow(clippy::unnecessary_wraps)] // Needs to match the API expected by Serde
fn lts_version_serde<'de, D>(deserializer: D) -> Result<bool, D::Error>
where
D: Deserializer<'de>,
Expand Down
6 changes: 3 additions & 3 deletions crates/volta-core/src/tool/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ fn is_version_like(value: &str) -> bool {
matches!(
value.parse(),
Ok(VersionSpec::Exact(_))
| Ok(VersionSpec::Semver(_))
| Ok(VersionSpec::Tag(VersionTag::Latest))
| Ok(VersionSpec::Tag(VersionTag::Lts))
| Ok(VersionSpec::Semver(_))
| Ok(VersionSpec::Tag(VersionTag::Latest))
| Ok(VersionSpec::Tag(VersionTag::Lts))
)
}

Expand Down
1 change: 1 addition & 0 deletions crates/volta-migrate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ impl MigrationState {
}
}

#[allow(clippy::unnecessary_wraps)] // Needs to be Fallible for Unix
fn detect_legacy_state(home: &Path) -> Fallible<Self> {
/*
Triage for determining the legacy layout version:
Expand Down
1 change: 1 addition & 0 deletions src/command/list/human.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ lazy_static! {
.subsequent_indent(INDENTATION);
}

#[allow(clippy::unnecessary_wraps)] // Needs to match the API of `plain::format`
pub(super) fn format(toolchain: &Toolchain) -> Option<String> {
// Formatting here depends on the toolchain: we do different degrees of
// indentation
Expand Down

0 comments on commit 176e057

Please sign in to comment.