From 7f196546c6b982e937b41f5d782bdbfcf06eb019 Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Tue, 25 Jul 2023 20:57:47 +0100 Subject: [PATCH] Fix a bunch of typos Signed-off-by: Alex Saveau --- README.md | 2 +- library/src/availability.rs | 8 ++++---- library/src/table.rs | 2 +- library/src/types.rs | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index dcb875591f8..7e8d7cf88cc 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Under the `web` directory you will find a binary crate that's capable of producing web-pages like [https://rust-lang.github.io/rustup-components-history/](https://rust-lang.github.io/rustup-components-history/). -Machine-readable information on the latests availability can be fetched on a +Machine-readable information on the latest availability can be fetched on a *per-component-per-target* basis, i.e. `https://rust-lang.github.io/rustup-components-history/$target/$package` where `$target` stands for a target host architecture, like `x86_64-unknown-linux-gnu`, and `$package` stands for a package diff --git a/library/src/availability.rs b/library/src/availability.rs index 837148e3f2e..8d48063bc8b 100644 --- a/library/src/availability.rs +++ b/library/src/availability.rs @@ -8,14 +8,14 @@ use std::{ }; type PackageName = String; -type TargetTripple = String; +type TargetTriple = String; type DatesSet = HashSet; type PackagesAvailability = HashMap; /// Data about packages availability in rust builds. #[derive(Debug, Default)] pub struct AvailabilityData { - data: HashMap, + data: HashMap, } /// A single row in an availability table. @@ -44,10 +44,10 @@ impl AvailabilityData { .get(&package_name) .map(|name| String::clone(name)) .unwrap_or(package_name); - for (target_tripple, target_info) in info.targets { + for (target_triple, target_info) in info.targets { if target_info.available { self.data - .entry(target_tripple.clone()) + .entry(target_triple.clone()) .or_default() .entry(package_name.clone()) .or_default() diff --git a/library/src/table.rs b/library/src/table.rs index 3cc34ac9e99..e602dd2b9e2 100644 --- a/library/src/table.rs +++ b/library/src/table.rs @@ -83,7 +83,7 @@ impl<'a, Dates, DateFmt, Additional> TableBuilder<'a, Dates, DateFmt, Additional } } - /// Sets a format in which the dates will be formated. Here's a formatting syntax for your + /// Sets a format in which the dates will be formatted. Here's a formatting syntax for your /// convenience: /// [chrono::format::strftime](https://docs.rs/chrono/0.4.6/chrono/format/strftime/index.html). /// diff --git a/library/src/types.rs b/library/src/types.rs index e4e71f7c28a..0311acc3e81 100644 --- a/library/src/types.rs +++ b/library/src/types.rs @@ -5,15 +5,15 @@ use std::{borrow::Borrow, ops::Deref, rc::Rc}; /// Reference-counted build-target triple. #[derive(Debug, Clone, Hash, PartialEq, Eq)] -pub struct TargetTripple(Rc); +pub struct TargetTriple(Rc); -impl fmt::Display for TargetTripple { +impl fmt::Display for TargetTriple { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.0) } } -impl Deref for TargetTripple { +impl Deref for TargetTriple { type Target = str; fn deref(&self) -> &str { @@ -21,18 +21,18 @@ impl Deref for TargetTripple { } } -impl Borrow for TargetTripple { +impl Borrow for TargetTriple { fn borrow(&self) -> &str { &self.0 } } -impl From for TargetTripple +impl From for TargetTriple where Rc: From, { fn from(t: T) -> Self { - TargetTripple(t.into()) + TargetTriple(t.into()) } }