Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #652

Merged
merged 3 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pica-matcher/src/field_matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pica-matcher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions pica-matcher/src/subfield_matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pica-record/src/io/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<()>;
Expand Down
2 changes: 1 addition & 1 deletion pica-record/src/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub type RecordRef<'a> = Record<&'a BStr>;
/// A mutable PICA+ tag.
pub type RecordMut = Record<BString>;

/// 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]>,
Expand Down
6 changes: 3 additions & 3 deletions pica-toolkit/src/commands/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -65,7 +65,7 @@ pub(crate) struct Filter {
/// An allow-list must be an CSV, whereby the first column contains
/// the IDN ([email protected]) 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<PathBuf>,
Expand All @@ -76,7 +76,7 @@ pub(crate) struct Filter {
/// An allow-list must be an CSV, whereby the first column contains
/// the IDN ([email protected]) 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<PathBuf>,
Expand Down
12 changes: 6 additions & 6 deletions pica-toolkit/src/commands/frequency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -83,7 +83,7 @@ pub(crate) struct Frequency {
#[arg(long, short)]
tsv: bool,

/// Transliterate output into the selected normalform <NF>
/// Transliterate output into the selected normal form <NF>
/// (possible values: "nfd", "nfkd", "nfc" and "nfkc").
#[arg(long,
value_name = "NF",
Expand All @@ -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<OsString>,
Expand Down
2 changes: 1 addition & 1 deletion pica-toolkit/src/commands/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NF>
/// Transliterate output into the selected normal form <NF>
#[arg(long,
value_name = "NF",
value_parser = ["nfd", "nfkd", "nfc", "nfkc"]
Expand Down
8 changes: 4 additions & 4 deletions pica-toolkit/src/commands/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -63,7 +63,7 @@ pub(crate) struct Select {
#[arg(long, short)]
tsv: bool,

/// Transliterate output into the selected normalform <NF>
/// Transliterate output into the selected normal form <NF>
/// (possible values: "nfd", "nfkd", "nfc" and "nfkc")
#[arg(long,
value_name = "NF",
Expand Down Expand Up @@ -111,7 +111,7 @@ pub(crate) struct Select {
/// An allow-list must be an CSV, whereby the first column contains
/// the IDN ([email protected]) 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<PathBuf>,
Expand All @@ -122,7 +122,7 @@ pub(crate) struct Select {
/// An allow-list must be an CSV, whereby the first column contains
/// the IDN ([email protected]) 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<PathBuf>,
Expand Down
Loading