Skip to content

Commit

Permalink
[meta] fix clippy and docs for Rust 1.73
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers committed Oct 10, 2023
1 parent 837d0ae commit a55ba92
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cargo-guppy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ pub fn cmd_subtree_size(options: &SubtreeSizeOptions) -> Result<()> {
}
}

let unique_list = unique_deps.entry(package_id).or_insert_with(HashSet::new);
let unique_list = unique_deps.entry(package_id).or_default();
if unique {
unique_list.insert(dep_package_id);
}
Expand Down
2 changes: 1 addition & 1 deletion guppy/src/graph/build_targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl<'g> Eq for (dyn BuildTargetKey + 'g) {}
// below.
impl<'g> PartialOrd for (dyn BuildTargetKey + 'g) {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.key().partial_cmp(&other.key())
Some(self.cmp(other))
}
}

Expand Down
2 changes: 1 addition & 1 deletion target-spec/src/triple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ impl Eq for TripleInner {}
impl PartialOrd for TripleInner {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.project().partial_cmp(&other.project())
Some(self.cmp(other))
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools/determinator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ file provided:
The list of file changes can be obtained from a source control system such as Git. This crate
provides a helper which simplifies the process of enumerating file lists while handling some
gnarly edge cases. For more information, see the documentation for
[`Utf8Paths0`](crate::Utf8Paths0).
`Utf8Paths0`.

These simple rules may need to be customized for particular scenarios (e.g. to ignore certain
files, or mark a package changed if a file outside of it changes). For those situations, the
Expand Down
2 changes: 1 addition & 1 deletion tools/determinator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
//! The list of file changes can be obtained from a source control system such as Git. This crate
//! provides a helper which simplifies the process of enumerating file lists while handling some
//! gnarly edge cases. For more information, see the documentation for
//! [`Utf8Paths0`](crate::Utf8Paths0).
//! [`Utf8Paths0`].
//!
//! These simple rules may need to be customized for particular scenarios (e.g. to ignore certain
//! files, or mark a package changed if a file outside of it changes). For those situations, the
Expand Down
6 changes: 3 additions & 3 deletions tools/hakari/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Hakari follows a three-step process.

### 1. Configuration

A [`HakariBuilder`](HakariBuilder) provides options to configure how a Hakari computation is done. Options supported
A `HakariBuilder` provides options to configure how a Hakari computation is done. Options supported
include:
* [the location of the `workspace-hack` package](HakariBuilder::new)
* [platforms to simulate Cargo builds on](HakariBuilder::set_platforms)
Expand Down Expand Up @@ -77,7 +77,7 @@ called to create a `Hakari` instance. The algorithm runs in three steps:

This computation is done in a parallel fashion, using the [Rayon](rayon) library.

The result of this computation is a [`Hakari`](Hakari) instance.
The result of this computation is a `Hakari` instance.

### 3. Serialization

Expand All @@ -101,7 +101,7 @@ The last step is to serialize the contents of the output map into the `workspace
The contents outside the `BEGIN HAKARI SECTION` and `END HAKARI SECTION` lines may be
edited by hand. The contents within this section are automatically generated.

On success, a [`HakariCargoToml`](HakariCargoToml) is returned.
On success, a `HakariCargoToml` is returned.

2. [`Hakari::to_toml_string`](Hakari::to_toml_string) returns the new contents of the
automatically generated section.
Expand Down
6 changes: 3 additions & 3 deletions tools/hakari/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
//!
//! ## 1. Configuration
//!
//! A [`HakariBuilder`](HakariBuilder) provides options to configure how a Hakari computation is done. Options supported
//! A [`HakariBuilder`] provides options to configure how a Hakari computation is done. Options supported
//! include:
//! * [the location of the `workspace-hack` package](HakariBuilder::new)
//! * [platforms to simulate Cargo builds on](HakariBuilder::set_platforms)
Expand Down Expand Up @@ -78,7 +78,7 @@
//!
//! This computation is done in a parallel fashion, using the [Rayon](rayon) library.
//!
//! The result of this computation is a [`Hakari`](Hakari) instance.
//! The result of this computation is a [`Hakari`] instance.
//!
//! ## 3. Serialization
//!
Expand All @@ -102,7 +102,7 @@
//! The contents outside the `BEGIN HAKARI SECTION` and `END HAKARI SECTION` lines may be
//! edited by hand. The contents within this section are automatically generated.
//!
//! On success, a [`HakariCargoToml`](HakariCargoToml) is returned.
//! On success, a [`HakariCargoToml`] is returned.
//!
//! 2. [`Hakari::to_toml_string`](Hakari::to_toml_string) returns the new contents of the
//! automatically generated section.
Expand Down
2 changes: 1 addition & 1 deletion tools/hakari/src/toml_out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ pub(crate) fn write_toml(
.filter_map(|&label| {
// Only care about named features here.
match label {
x if x == "default" => None,
"default" => None,
feature_name => Some(feature_name),
}
})
Expand Down

0 comments on commit a55ba92

Please sign in to comment.