From c6dab510f196bfd327393e2bc8e546db967298a6 Mon Sep 17 00:00:00 2001 From: Nico Wagner Date: Mon, 10 Jul 2023 02:19:35 +0200 Subject: [PATCH] Fix typos --- pica-matcher/src/field_matcher.rs | 2 +- pica-matcher/src/lib.rs | 2 +- pica-matcher/src/subfield_matcher.rs | 4 ++-- pica-record/src/io/writer.rs | 2 +- pica-record/src/record.rs | 2 +- pica-toolkit/src/commands/filter.rs | 6 +++--- pica-toolkit/src/commands/frequency.rs | 12 ++++++------ pica-toolkit/src/commands/print.rs | 2 +- pica-toolkit/src/commands/select.rs | 8 ++++---- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pica-matcher/src/field_matcher.rs b/pica-matcher/src/field_matcher.rs index 44d349785..c06ebe223 100644 --- a/pica-matcher/src/field_matcher.rs +++ b/pica-matcher/src/field_matcher.rs @@ -97,7 +97,7 @@ impl ExistsMatcher { } } -/// A field matcher that checks for fields statifies subfield criterion. +/// A field matcher that checks for fields satisfies subfield criterion. #[derive(Debug, PartialEq, Eq)] pub struct SubfieldsMatcher { tag_matcher: TagMatcher, diff --git a/pica-matcher/src/lib.rs b/pica-matcher/src/lib.rs index 678ea90eb..3d4cdfcf4 100644 --- a/pica-matcher/src/lib.rs +++ b/pica-matcher/src/lib.rs @@ -18,7 +18,7 @@ pub use record_matcher::RecordMatcher; pub use subfield_matcher::SubfieldMatcher; pub use tag_matcher::TagMatcher; -/// Parsers recognizing matcher for PICA+ primitves. +/// Parsers recognizing matcher for PICA+ primitives. pub mod parser { pub use super::field_matcher::parse_field_matcher; pub use super::occurrence_matcher::parse_occurrence_matcher; diff --git a/pica-matcher/src/subfield_matcher.rs b/pica-matcher/src/subfield_matcher.rs index f57ea36f5..80369daa1 100644 --- a/pica-matcher/src/subfield_matcher.rs +++ b/pica-matcher/src/subfield_matcher.rs @@ -205,7 +205,7 @@ impl RelationMatcher { } /// Returns `true` if the given values is a prefix of the matcher's - /// value, otherwise `false`. If the `case_ignore` flag ist set, + /// value, otherwise `false`. If the `case_ignore` flag is set, /// both strings will be converted to lowercase first. fn starts_with( &self, @@ -227,7 +227,7 @@ impl RelationMatcher { } /// Returns `true` if the given values is a suffix of the matcher's - /// value, otherwise `false`. If the `case_ignore` flag ist set, + /// value, otherwise `false`. If the `case_ignore` flag is set, /// both strings will be converted to lowercase first. fn ends_with( &self, diff --git a/pica-record/src/io/writer.rs b/pica-record/src/io/writer.rs index f87c88c94..7c61e7fe5 100644 --- a/pica-record/src/io/writer.rs +++ b/pica-record/src/io/writer.rs @@ -8,7 +8,7 @@ use flate2::Compression; use crate::ByteRecord; -/// A tait that permits writing [ByteRecord]s. +/// A trait that permits writing [ByteRecord]s. pub trait ByteRecordWrite { /// Writes a [ByteRecord] into this writer. fn write_byte_record(&mut self, record: &ByteRecord) -> Result<()>; diff --git a/pica-record/src/record.rs b/pica-record/src/record.rs index 7c504d457..c35222f4c 100644 --- a/pica-record/src/record.rs +++ b/pica-record/src/record.rs @@ -27,7 +27,7 @@ pub type RecordRef<'a> = Record<&'a BStr>; /// A mutable PICA+ tag. pub type RecordMut = Record; -/// A PICA+ record, that may contian invalid UTF-8 data. +/// A PICA+ record, that may contain invalid UTF-8 data. #[derive(Debug)] pub struct ByteRecord<'a> { raw_data: Option<&'a [u8]>, diff --git a/pica-toolkit/src/commands/filter.rs b/pica-toolkit/src/commands/filter.rs index 3fb12310d..68dc82173 100644 --- a/pica-toolkit/src/commands/filter.rs +++ b/pica-toolkit/src/commands/filter.rs @@ -33,7 +33,7 @@ pub(crate) struct Filter { #[arg(long, short = 'v')] invert_match: bool, - /// When this flag is provided, comparision operations will be + /// When this flag is provided, comparison operations will be /// search case insensitive #[arg(long, short)] ignore_case: bool, @@ -65,7 +65,7 @@ pub(crate) struct Filter { /// An allow-list must be an CSV, whereby the first column contains /// the IDN (003@.0) or an Apache Arrow file with an `idn` column. /// If the file extension is `.feather`, `.arrow`, or `.ipc` the - /// file is automatically interpreted as Apachae Arrow; + /// file is automatically interpreted as Apache Arrow; /// otherwise the file is read as CSV. #[arg(long, short = 'A')] allow_list: Vec, @@ -76,7 +76,7 @@ pub(crate) struct Filter { /// An allow-list must be an CSV, whereby the first column contains /// the IDN (003@.0) or an Apache Arrow file with an `idn` column. /// If the file extension is `.feather`, `.arrow`, or `.ipc` the - /// file is automatically interpreted as Apachae Arrow; + /// file is automatically interpreted as Apache Arrow; /// otherwise the file is read as CSV. #[arg(long, short = 'D')] deny_list: Vec, diff --git a/pica-toolkit/src/commands/frequency.rs b/pica-toolkit/src/commands/frequency.rs index 15ffc5596..850ba896f 100644 --- a/pica-toolkit/src/commands/frequency.rs +++ b/pica-toolkit/src/commands/frequency.rs @@ -29,19 +29,19 @@ pub(crate) struct FrequencyConfig { /// the given path expression. By default, the resulting frequency table /// is sorted in descending order by default (the most frequent value is /// printed first). If the count of two or more subfield values is -/// euqal, these lines are given in lexicographical order. +/// equal, these lines are given in lexicographical order. /// /// The set of fields, which are included in the result of a record, can -/// be resricted by an optional subfield filter. A subfield filter +/// be restricted by an optional subfield filter. A subfield filter /// requires the {}-notation and is expected at the first position (e.g. -/// "044H/*{b == 'GND && 9?, 9}"). +/// "044H/*{b == 'GND' && 9?, 9}"). #[derive(Parser, Debug)] pub(crate) struct Frequency { /// Skip invalid records that can't be decoded as normalized PICA+. #[arg(long, short)] skip_invalid: bool, - /// When this flag is set, comparision operations will be search + /// When this flag is set, comparison operations will be search /// case insensitive #[arg(long, short)] ignore_case: bool, @@ -83,7 +83,7 @@ pub(crate) struct Frequency { #[arg(long, short)] tsv: bool, - /// Transliterate output into the selected normalform + /// Transliterate output into the selected normal form /// (possible values: "nfd", "nfkd", "nfc" and "nfkc"). #[arg(long, value_name = "NF", @@ -100,7 +100,7 @@ pub(crate) struct Frequency { path: String, /// Read one or more files in normalized PICA+ format. With no - /// files, or when a filename is '-', read from stanard input + /// files, or when a filename is '-', read from standard input /// (stdin). #[arg(default_value = "-", hide_default_value = true)] filenames: Vec, diff --git a/pica-toolkit/src/commands/print.rs b/pica-toolkit/src/commands/print.rs index b9c12e1d8..2650c96f2 100644 --- a/pica-toolkit/src/commands/print.rs +++ b/pica-toolkit/src/commands/print.rs @@ -82,7 +82,7 @@ pub(crate) struct Print { #[arg(long, short, value_name = "n", default_value = "0")] limit: usize, - /// Transliterate output into the selected normalform + /// Transliterate output into the selected normal form #[arg(long, value_name = "NF", value_parser = ["nfd", "nfkd", "nfc", "nfkc"] diff --git a/pica-toolkit/src/commands/select.rs b/pica-toolkit/src/commands/select.rs index ea149a6ab..ff41916b1 100644 --- a/pica-toolkit/src/commands/select.rs +++ b/pica-toolkit/src/commands/select.rs @@ -54,7 +54,7 @@ pub(crate) struct Select { #[arg(long, short)] unique: bool, - /// When this flag is provided, comparision operations will be + /// When this flag is provided, comparison operations will be /// search case insensitive #[arg(long, short)] ignore_case: bool, @@ -63,7 +63,7 @@ pub(crate) struct Select { #[arg(long, short)] tsv: bool, - /// Transliterate output into the selected normalform + /// Transliterate output into the selected normal form /// (possible values: "nfd", "nfkd", "nfc" and "nfkc") #[arg(long, value_name = "NF", @@ -111,7 +111,7 @@ pub(crate) struct Select { /// An allow-list must be an CSV, whereby the first column contains /// the IDN (003@.0) or an Apache Arrow file with an `idn` column. /// If the file extension is `.feather`, `.arrow`, or `.ipc` the - /// file is automatically interpreted as Apachae Arrow; + /// file is automatically interpreted as Apache Arrow; /// otherwise the file is read as CSV. #[arg(long, short = 'A')] allow_list: Vec, @@ -122,7 +122,7 @@ pub(crate) struct Select { /// An allow-list must be an CSV, whereby the first column contains /// the IDN (003@.0) or an Apache Arrow file with an `idn` column. /// If the file extension is `.feather`, `.arrow`, or `.ipc` the - /// file is automatically interpreted as Apachae Arrow; + /// file is automatically interpreted as Apache Arrow; /// otherwise the file is read as CSV. #[arg(long, short = 'D')] deny_list: Vec,