Skip to content

Commit

Permalink
Fix a bunch of typos
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX authored and mexus committed Jul 26, 2023
1 parent c001a06 commit 7f19654
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions library/src/availability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ use std::{
};

type PackageName = String;
type TargetTripple = String;
type TargetTriple = String;
type DatesSet = HashSet<NaiveDate>;
type PackagesAvailability = HashMap<PackageName, DatesSet>;

/// Data about packages availability in rust builds.
#[derive(Debug, Default)]
pub struct AvailabilityData {
data: HashMap<TargetTripple, PackagesAvailability>,
data: HashMap<TargetTriple, PackagesAvailability>,
}

/// A single row in an availability table.
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion library/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
///
Expand Down
12 changes: 6 additions & 6 deletions library/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@ use std::{borrow::Borrow, ops::Deref, rc::Rc};

/// Reference-counted build-target triple.
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub struct TargetTripple(Rc<str>);
pub struct TargetTriple(Rc<str>);

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 {
&self.0
}
}

impl Borrow<str> for TargetTripple {
impl Borrow<str> for TargetTriple {
fn borrow(&self) -> &str {
&self.0
}
}

impl<T> From<T> for TargetTripple
impl<T> From<T> for TargetTriple
where
Rc<str>: From<T>,
{
fn from(t: T) -> Self {
TargetTripple(t.into())
TargetTriple(t.into())
}
}

Expand Down

0 comments on commit 7f19654

Please sign in to comment.