diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index b7f08016..dbb8d175 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -1,4 +1,3 @@ - name: Lint and Test on: [push, pull_request] @@ -8,7 +7,7 @@ jobs: name: fmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - run: rustup update - run: rustup component add rustfmt - run: cargo fmt -- --check @@ -17,7 +16,7 @@ jobs: name: clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - run: rustup update - run: rustup component add clippy - run: cargo clippy --all --all-targets --all-features @@ -25,11 +24,17 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - run: rustup update - run: cargo build --all-features - run: cargo test --verbose --all --all-features env: - RUST_BACKTRACE: 1 \ No newline at end of file + RUST_BACKTRACE: 1 + + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: crate-ci/typos@master diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f5ea39cf..aca63445 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -27,7 +27,7 @@ - new API for prefix map - new IRI wrappers and traits in sophia_iri - Serializers for Turtle and TriG (with 2 modes: fast and pretty) - Oher major changes + Other major changes - Now entirely modular: sophia is essentially only a compilation of smaller crates Documentation @@ -95,7 +95,7 @@ - Common traits for parsers and serializers - More idiomatic API for Triple- and QuadSource Dev - - reduced dependancies (coercible-errors, error-chain, pest) + - reduced dependencies (coercible-errors, error-chain, pest) - no more central Error type 0.3.0 diff --git a/api/src/dataset/_foreign_impl.rs b/api/src/dataset/_foreign_impl.rs index 5da41e9e..c97d4cf5 100644 --- a/api/src/dataset/_foreign_impl.rs +++ b/api/src/dataset/_foreign_impl.rs @@ -574,7 +574,7 @@ impl SetDataset for HashSet {} // BTreeSet of quads -/// NB: This is a straighforward and minimal implementation, +/// NB: This is a straightforward and minimal implementation, /// not taking advantage of the order of terms to optimize [`Dataset::quads_matching`] /// nor other methods. impl Dataset for BTreeSet { diff --git a/api/src/graph/_foreign_impl.rs b/api/src/graph/_foreign_impl.rs index ac1dc9e4..19c570db 100644 --- a/api/src/graph/_foreign_impl.rs +++ b/api/src/graph/_foreign_impl.rs @@ -345,7 +345,7 @@ impl SetGraph for HashSet {} // BTreeSet of triples -/// NB: This is a straighforward and minimal implementation, +/// NB: This is a straightforward and minimal implementation, /// not taking advantage of the order of terms to optimize [`Graph::triples_matching`] /// nor other methods. impl Graph for BTreeSet { diff --git a/api/src/ns.rs b/api/src/ns.rs index 4d68bf1e..1cdd2365 100644 --- a/api/src/ns.rs +++ b/api/src/ns.rs @@ -265,7 +265,7 @@ mod test { let ns1 = Namespace::new("http://schema.org/").unwrap(); assert_ne!( ns1.get("name").unwrap().to_string(), - ns1.get("nam").unwrap().to_string() + ns1.get("givenName").unwrap().to_string() ); } diff --git a/api/src/ns/_macro.rs b/api/src/ns/_macro.rs index 623ebb6d..28b7733f 100644 --- a/api/src/ns/_macro.rs +++ b/api/src/ns/_macro.rs @@ -35,7 +35,7 @@ macro_rules! namespace { $crate::ns_iri!(PREFIX, $r_id, $r_sf); )* - /// Test module for checking tha IRIs are valid + /// Test module for checking that IRIs are valid #[cfg(test)] mod test_valid_iri { $( diff --git a/api/src/sparql.rs b/api/src/sparql.rs index c64f2250..a4d12916 100644 --- a/api/src/sparql.rs +++ b/api/src/sparql.rs @@ -44,7 +44,7 @@ pub trait SparqlDataset { type SparqlError: Error + 'static; /// The type representing pre-processed queries. /// - /// See [`prepare_query`](#tymethod.prepare_query) for more defail. + /// See [`prepare_query`](#tymethod.prepare_query) for more detail. type Query: Query; /// Parse and immediately execute `query`. @@ -61,7 +61,7 @@ pub trait SparqlDataset { /// /// This allows some implementation to separate parsing, /// (or any other pre-processing step) - /// of the query string from the actual exectution of the query. + /// of the query string from the actual execution of the query. /// There is however no guarantee on how much pre-processing is actually done by this method /// (see below). /// @@ -96,7 +96,7 @@ impl Query for String { /// A utility trait to allow [`SparqlDataset::query`] /// to accept either `&str` or [`Self::Query`](SparqlDataset::Query). pub trait IntoQuery { - /// The ouput type of [`into_query`](IntoQuery::into_query). + /// The output type of [`into_query`](IntoQuery::into_query). type Out: Borrow; /// Convert `self` to a [`Query`]. fn into_query(self) -> Result; diff --git a/api/src/term.rs b/api/src/term.rs index 551ec0f4..9348e15f 100644 --- a/api/src/term.rs +++ b/api/src/term.rs @@ -62,7 +62,7 @@ pub enum TermKind { /// However, while all other methods have a default implementtation (returning `None`), /// those corresponding to the supported kinds MUST be overridden accordingly, /// otherwise they will panic. -/// See below for an explaination of this design choice. +/// See below for an explanation of this design choice. /// /// In order to test that all the methods are implemented consistently, /// consider using the macro [`assert_consistent_term_impl`]. @@ -71,7 +71,7 @@ pub enum TermKind { /// /// # Design rationale /// -/// The methods defined by this trait are not independant: +/// The methods defined by this trait are not independent: /// depending on the value returned by [`kind`](Term::kind), /// other methods are expected to return `Some(...)` or `None` accordingly. /// @@ -111,28 +111,28 @@ pub trait Term: std::fmt::Debug { fn kind(&self) -> TermKind; /// Return true if this [`Term`] is an IRI, - /// i.e. if [`kind`](Term::kind) retuns [`TermKind::Iri`]. + /// i.e. if [`kind`](Term::kind) returns [`TermKind::Iri`]. #[inline] fn is_iri(&self) -> bool { self.kind() == TermKind::Iri } /// Return true if this [`Term`] is a blank node, - /// i.e. if [`kind`](Term::kind) retuns [`TermKind::BlankNode`]. + /// i.e. if [`kind`](Term::kind) returns [`TermKind::BlankNode`]. #[inline] fn is_blank_node(&self) -> bool { self.kind() == TermKind::BlankNode } /// Return true if this [`Term`] is a literal, - /// i.e. if [`kind`](Term::kind) retuns [`TermKind::Literal`]. + /// i.e. if [`kind`](Term::kind) returns [`TermKind::Literal`]. #[inline] fn is_literal(&self) -> bool { self.kind() == TermKind::Literal } /// Return true if this [`Term`] is a variable, - /// i.e. if [`kind`](Term::kind) retuns [`TermKind::Variable`]. + /// i.e. if [`kind`](Term::kind) returns [`TermKind::Variable`]. #[inline] fn is_variable(&self) -> bool { self.kind() == TermKind::Variable @@ -153,7 +153,7 @@ pub trait Term: std::fmt::Debug { } /// Return true if this [`Term`] is an RDF-star quoted triple, - /// i.e. if [`kind`](Term::kind) retuns [`TermKind::Triple`]. + /// i.e. if [`kind`](Term::kind) returns [`TermKind::Triple`]. #[inline] fn is_triple(&self) -> bool { self.kind() == TermKind::Triple @@ -311,7 +311,7 @@ pub trait Term: std::fmt::Debug { } } - /// Iter over all the constiutents of this term, consuming it. + /// Iter over all the constituents of this term, consuming it. /// /// See [Term::constituents]. fn to_constituents<'a>(self) -> Box + 'a> @@ -435,7 +435,7 @@ pub trait Term: std::fmt::Debug { }) } - /// Compute an implementation-independant hash of this RDF term. + /// Compute an implementation-independent hash of this RDF term. fn hash(&self, state: &mut H) { let k = self.kind(); k.hash(state); diff --git a/api/src/term/_cmp.rs b/api/src/term/_cmp.rs index a52d6448..c2fb8d14 100644 --- a/api/src/term/_cmp.rs +++ b/api/src/term/_cmp.rs @@ -68,11 +68,11 @@ impl Term for CmpTerm { fn try_into_term(self) -> Result { self.0.try_into_term() } - // NOT overridding the iterator methods + // NOT overriding the iterator methods // (constituents, to_constituents, atoms, to_atoms) // because this would introduce an additional Box indirection, // potentially hurting performances, - // beyond the benefit of a hypotherical custom impl of these methods in T. + // beyond the benefit of a hypothetical custom impl of these methods in T. } impl PartialEq for CmpTerm { diff --git a/api/src/term/_simple.rs b/api/src/term/_simple.rs index 2f0d3cc0..aa555bab 100644 --- a/api/src/term/_simple.rs +++ b/api/src/term/_simple.rs @@ -5,7 +5,7 @@ lazy_static::lazy_static! { static ref RDF_LANG_STRING: Box = rdf::langString.iri().unwrap().unwrap().into(); } -/// A straighforward implementation of [`Term`] as an enum. +/// A straightforward implementation of [`Term`] as an enum. #[derive(Clone, Debug)] pub enum SimpleTerm<'a> { /// An [RDF IRI](https://www.w3.org/TR/rdf11-concepts/#section-IRIs) diff --git a/book/src/ch04_rdf_graphs.md b/book/src/ch04_rdf_graphs.md index c70af9be..6d399958 100644 --- a/book/src/ch04_rdf_graphs.md +++ b/book/src/ch04_rdf_graphs.md @@ -103,7 +103,7 @@ and are described in more detail in the [next chapter](./ch05_term_matchers.md). * [`sophia::inmem::LightGraph`] provides a [`Graph`] and [`MutableGraph`] implementation with a low memory footprint; * [`sophia::inmem::FastGraph`] provides a [`Graph`] and [`MutableGraph`] implementation designed for fast retrieval of any given triple. -## Recipies for constructing graphs +## Recipes for constructing graphs ### Constructing and populating an empty graph diff --git a/c14n/src/rdfc10.rs b/c14n/src/rdfc10.rs index 796f31cd..afa399a6 100644 --- a/c14n/src/rdfc10.rs +++ b/c14n/src/rdfc10.rs @@ -61,7 +61,7 @@ pub fn normalize_with( let (mut quads, _) = relabel_with::(d, depth_factor, permutation_limit)?; let mut buf1 = String::new(); let mut buf2 = String::new(); - // we sort the quads, but comparing the terms based on ther NQ serialization, + // we sort the quads, but comparing the terms based on their NQ serialization, // which amounts to sorting the N-Quads lines without materializing them quads.sort_unstable_by(|q1, q2| { for (t1, t2) in iter_spog_opt(q1.spog()).zip(iter_spog_opt(q2.spog())) { @@ -129,7 +129,7 @@ pub fn relabel_sha384( /// /// The parameters `depth_factor` and `permutation_limit` /// are used to stop the algorithm if the computation becomes too complex, -/// in order to secure it agains [dataset poisoning](https://www.w3.org/TR/rdf-canon/#dataset-poisoning). +/// in order to secure it against [dataset poisoning](https://www.w3.org/TR/rdf-canon/#dataset-poisoning). /// The default values ([`DEFAULT_DEPTH_FACTOR`]) and [`DEFAULT_PERMUTATION_LIMIT`]) /// are expected to work with any "realistic" dataset. /// @@ -470,7 +470,7 @@ fn hash_first_degree_quads(bnid: &str, quads: &[&Q]) - } let ret = hasher.finalize(); debug_assert!({ - eprintln!("hash-fisrt-degree({})\n-> {}", bnid, hex(&ret)); + eprintln!("hash-first-degree({})\n-> {}", bnid, hex(&ret)); true }); ret @@ -723,13 +723,13 @@ _:c14n4 _:c14n3 . Ok(unsafe { String::from_utf8_unchecked(output) }) } - /// Simplisitic Quad parser, useful for writing test cases. + /// Simplistic Quad parser, useful for writing test cases. /// It is based on eq_quad below. fn ez_quads<'a>(lines: &[&'a str]) -> std::collections::HashSet>> { lines.iter().map(|line| ez_quad(line)).collect() } - /// Simplisitic Quad parser, useful for writing test cases. + /// Simplistic Quad parser, useful for writing test cases. /// The syntax is a subset of N-Quads-star, /// where spaces are not allowed in literals, and a space is required before the ending '.'. fn ez_quad(txt: &str) -> Spog { @@ -791,9 +791,9 @@ _:c14n4 _:c14n3 . _:c14n0 . _:c14n1 . "#; - let mut dout = Vec::::new(); - normalize_sha384(&dataset, &mut dout).unwrap(); - let got = unsafe { String::from_utf8_unchecked(dout) }; + let mut got = Vec::::new(); + normalize_sha384(&dataset, &mut got).unwrap(); + let got = unsafe { String::from_utf8_unchecked(got) }; println!(">>>> GOT\n{}>>>> EXPECTED\n{}<<<<", got, exp); assert!(got == exp); } diff --git a/inmem/src/index.rs b/inmem/src/index.rs index 8ce1c32b..6177e558 100644 --- a/inmem/src/index.rs +++ b/inmem/src/index.rs @@ -130,7 +130,7 @@ impl SimpleTermIndex { } } - /// The numver of terms in this index + /// The number of terms in this index pub fn len(&self) -> usize { self.i2t.len() } diff --git a/iri/src/_wrap_macro.rs b/iri/src/_wrap_macro.rs index 0c07e252..05d01f7d 100644 --- a/iri/src/_wrap_macro.rs +++ b/iri/src/_wrap_macro.rs @@ -53,7 +53,7 @@ /// } /// ``` /// -/// Two [examples](crate::wrap_macro_examples) are availble, +/// Two [examples](crate::wrap_macro_examples) are available, /// illustrating the members and trait implementation generated by this macro. /// /// NB: the documentation of the wrapper will point to the documentation of the `new` method. diff --git a/iri/src/lib.rs b/iri/src/lib.rs index ec434d48..23d5a5ef 100644 --- a/iri/src/lib.rs +++ b/iri/src/lib.rs @@ -1,9 +1,9 @@ //! This crate provides functions for validating IRIs and IRI references, -//! as well as for resolving IRI references agains a given base IRI. +//! as well as for resolving IRI references against a given base IRI. //! //! It is developed as a part of [Sophia], //! an [RDF] and [Linked Data] toolkit in Rust, -//! but can be used independantly. +//! but can be used independently. //! //! # Feature gates //! diff --git a/iri/src/test.rs b/iri/src/test.rs index eafb0abc..604a722d 100644 --- a/iri/src/test.rs +++ b/iri/src/test.rs @@ -4,8 +4,8 @@ //! this module publicly exports arrays of test data, //! for the benefit of other crates. -/// Structure of an IRI referece. -/// See [`POSITIVIE_IRIS`](constant.POSITIVE_IRIS.html) for more details. +/// Structure of an IRI reference. +/// See [`POSITIVE_IRIS`](constant.POSITIVE_IRIS.html) for more details. pub type IriRefStructure<'a> = ( bool, Option<&'a str>, diff --git a/isomorphism/src/iso_term.rs b/isomorphism/src/iso_term.rs index cb74e970..084eb8ae 100644 --- a/isomorphism/src/iso_term.rs +++ b/isomorphism/src/iso_term.rs @@ -1,5 +1,5 @@ //! I define [`IsoTerm`], -//! a [`Term`] wrapper implemting [`Ord`] and [`Eq`] +//! a [`Term`] wrapper implementing [`Ord`] and [`Eq`] //! in a way that is convenient to compute graph/dataset isomorphism. //! //! More specifically, all blank nodes are considered equal. @@ -75,11 +75,11 @@ impl Term for IsoTerm { fn try_into_term(self) -> Result { self.0.try_into_term() } - // NOT overridding the iterator methods + // NOT overriding the iterator methods // (constituents, to_constituents, atoms, to_atoms) // because this would introduce an additional Box indirection, // potentially hurting performances, - // beyond the benefit of a hypotherical custom impl of these methods in T. + // beyond the benefit of a hypothetical custom impl of these methods in T. } impl PartialEq> for IsoTerm diff --git a/isomorphism/src/lib.rs b/isomorphism/src/lib.rs index de557b84..ec487360 100644 --- a/isomorphism/src/lib.rs +++ b/isomorphism/src/lib.rs @@ -35,7 +35,7 @@ //! //! are considered isomorphic by the algorithm of this crate, //! because they have the same number of blank nodes and arcs, -//! and all of their blank nodes are locally indistinguisable +//! and all of their blank nodes are locally indistinguishable //! (same number of incoming and outgoinc arcs, //! linking them to undistinguishable blank nodes). //! diff --git a/jsonld/src/serializer.rs b/jsonld/src/serializer.rs index b6ef5d99..75dc5386 100644 --- a/jsonld/src/serializer.rs +++ b/jsonld/src/serializer.rs @@ -104,7 +104,7 @@ where pub type Jsonifier = JsonLdSerializer; /// This type is just a placeholder [`JsonLdSerializer`] -/// targetting a [`JsonValue`]. +/// targeting a [`JsonValue`]. /// See [`new_jsonifier`] and [`new_jsonifier_with`]. /// /// [`new_jsonifier`]: struct.JsonLdSerializer.html#method.new_jsonifier diff --git a/jsonld/src/serializer/engine.rs b/jsonld/src/serializer/engine.rs index 76d54ed0..9905af55 100644 --- a/jsonld/src/serializer/engine.rs +++ b/jsonld/src/serializer/engine.rs @@ -210,7 +210,7 @@ impl<'a, L> Engine<'a, L> { || (self.options.rdf_direction() == Some(RdfDirection::CompoundLiteral) && self.compound_literals.contains(&inode)) { - //println!("=== skiped (list node or compound literal)"); + //println!("=== skipped (list node or compound literal)"); return Ok(None); } //println!("=== --- doing it"); diff --git a/jsonld/src/vocabulary.rs b/jsonld/src/vocabulary.rs index 45a1e908..39f5e38f 100644 --- a/jsonld/src/vocabulary.rs +++ b/jsonld/src/vocabulary.rs @@ -18,7 +18,7 @@ pub type ArcTag = sophia_api::term::LanguageTag>; /// A [`Vocabulary`](rdf_types::Vocabulary) using `Arc`-based types as index. /// /// These types match the notion of index in [`rdf_types`] as they are relatively cheap to clone, -/// but offer the advantage of being self-explanatory, and resolvable to actual terms withour actually needing the vocabulary. +/// but offer the advantage of being self-explanatory, and resolvable to actual terms without actually needing the vocabulary. #[derive(Clone, Debug, Default)] pub struct ArcVoc {} diff --git a/resource/src/loader/_local.rs b/resource/src/loader/_local.rs index 30b4c623..2e7e9bf6 100644 --- a/resource/src/loader/_local.rs +++ b/resource/src/loader/_local.rs @@ -10,7 +10,7 @@ use std::sync::Arc; /// A resource loader using local versions of the resources. /// /// It guesses content-type from the file extensions, -/// and emulates content-negociation : +/// and emulates content-negotiation : /// if a resource is not found, it will try adding a few well-known extensions to it. #[derive(Clone, Debug, Default)] pub struct LocalLoader { diff --git a/resource/src/resource/_error.rs b/resource/src/resource/_error.rs index 879a3840..5c8be7eb 100644 --- a/resource/src/resource/_error.rs +++ b/resource/src/resource/_error.rs @@ -17,7 +17,7 @@ pub enum ResourceError { /// The error that was raised error: E, }, - /// A value was expeced and not found for the given predicate on the given resource + /// A value was expected and not found for the given predicate on the given resource NoValueFor { /// The identifier of the resource id: SimpleTerm<'static>, diff --git a/rio/src/model.rs b/rio/src/model.rs index 16c3684c..0883d0e3 100644 --- a/rio/src/model.rs +++ b/rio/src/model.rs @@ -188,7 +188,7 @@ impl<'a> Term for Trusted> { Self: Sized, { if let Subject::Triple(_) = self.0 { - // there is an impedence mismatch between Sophia and Rio: + // there is an impedance mismatch between Sophia and Rio: // we can not convert a triple into [Subject; 3] unimplemented!() } else { diff --git a/sophia/examples/canonicalize.rs b/sophia/examples/canonicalize.rs index 3b0bfb99..5885d1dc 100644 --- a/sophia/examples/canonicalize.rs +++ b/sophia/examples/canonicalize.rs @@ -1,5 +1,5 @@ -//! Read a Dataset serialized in [N-Quads] from the standart input, -//! and write back to the standatd output its canonical form, +//! Read a Dataset serialized in [N-Quads] from the standard input, +//! and write back to the standard output its canonical form, //! using the [RDFC-1.0] canonicalization algorithm. //! //! Parameters of the RDFC-1.0 can be provided via the following environment variables: diff --git a/sophia/examples/parse.rs b/sophia/examples/parse.rs index 6251bdfb..eaa97661 100644 --- a/sophia/examples/parse.rs +++ b/sophia/examples/parse.rs @@ -14,8 +14,8 @@ //! - [`trig`](https://www.w3.org/TR/trig/) //! - `gnq` (Generalized [N-Quads](https://www.w3.org/TR/n-quads/)) //! - `gtrig` (Generalized [TriG](https://www.w3.org/TR/trig/), default) -//! - [`jsonld`](https://www.w3.org/TR/json-ld11) (if compiled witht the `jsonld` feature) -//! - [`rdfxml`](https://www.w3.org/TR/rdf-syntax-grammar) (if compiled witht the `xml` feature, alias `rdf`) +//! - [`jsonld`](https://www.w3.org/TR/json-ld11) (if compiled with the `jsonld` feature) +//! - [`rdfxml`](https://www.w3.org/TR/rdf-syntax-grammar) (if compiled with the `xml` feature, alias `rdf`) //! //! [N-Triples]: https://www.w3.org/TR/n-triples/ //! [N-Quads]: https://www.w3.org/TR/n-quads/ diff --git a/sophia/examples/serialize.rs b/sophia/examples/serialize.rs index 314a01d6..67dbd8fe 100644 --- a/sophia/examples/serialize.rs +++ b/sophia/examples/serialize.rs @@ -1,16 +1,16 @@ //! Read a graph or a dataset from the standard input in [N-Triples]/[N-Quads], -//! and serialize it back to the format specifed in the first argument. +//! and serialize it back to the format specified in the first argument. //! //! Recognized formats are: //! - [`ntriples`](https://www.w3.org/TR/n-triples/) (alias `nt`) //! - [`turtle`](https://www.w3.org/TR/turtle/) (alias `ttl`) //! - [`nquads`](https://www.w3.org/TR/n-quads/) (alias `nq`) //! - [`trig`](https://www.w3.org/TR/trig/) -//! - [`jsonld`](https://www.w3.org/TR/json-ld11) (if compiled witht the `jsonld` feature) -//! - [`rdfxml`](https://www.w3.org/TR/rdf-syntax-grammar) (if compiled witht the `xml` feature, alias `rdf`) +//! - [`jsonld`](https://www.w3.org/TR/json-ld11) (if compiled with the `jsonld` feature) +//! - [`rdfxml`](https://www.w3.org/TR/rdf-syntax-grammar) (if compiled with the `xml` feature, alias `rdf`) //! //! NB: if the input is a dataset with named graphs, -//! and the ouput format is a graph format, +//! and the output format is a graph format, //! then only the default graph is serialized. //! //! [N-Triples]: https://www.w3.org/TR/n-triples/ @@ -65,7 +65,7 @@ fn main() { #[cfg(feature = "xml")] "rdfxml" | "rdf" => { let indent = if pretty { 4 } else { 0 }; - let config = RdfXmlConfig::new().with_identation(indent); + let config = RdfXmlConfig::new().with_indentation(indent); let ser = RdfXmlSerializer::new_with_config(out, config); serialize_triples(quad_source, ser) } diff --git a/term/src/_macro.rs b/term/src/_macro.rs index 93786e43..6a7d27bb 100644 --- a/term/src/_macro.rs +++ b/term/src/_macro.rs @@ -16,7 +16,7 @@ macro_rules! gen_term { #[doc = " under the hood."] #[derive(Clone, Debug)] pub enum $type_name { - /// A straighforward implementation of [`Term`] as an enum. + /// A straightforward implementation of [`Term`] as an enum. /// An [RDF IRI](https://www.w3.org/TR/rdf11-concepts/#section-IRIs) Iri(IriRef>), /// An RDF [blank node](https://www.w3.org/TR/rdf11-concepts/#section-blank-nodes) diff --git a/term/src/lib.rs b/term/src/lib.rs index 11bd0c2d..47d6db5f 100644 --- a/term/src/lib.rs +++ b/term/src/lib.rs @@ -52,31 +52,31 @@ mod test { let t4a = "42"; let t4b = stash.copy_term(t4a); assert!(Term::eq(&t4a, &t4b)); - assert_eq!(old_len, stash.len()); // all values where alreadt there + assert_eq!(old_len, stash.len()); // all values where already there old_len = stash.len(); let t5a = BnodeId::new_unchecked("foo"); let t5b = stash.copy_term(t5a); assert!(Term::eq(&t5a, &t5b)); - assert_eq!(old_len, stash.len()); // all values where alreadt there + assert_eq!(old_len, stash.len()); // all values where already there old_len = stash.len(); let t6a = VarName::new_unchecked("foobar"); let t6b = stash.copy_term(t6a); assert!(Term::eq(&t6a, &t6b)); - assert_eq!(old_len + 1, stash.len()); // all values where alreadt there + assert_eq!(old_len + 1, stash.len()); // all values where already there old_len = stash.len(); let t1c = stash.copy_term(&t1b); assert!(Term::eq(&t1a, &t1c)); - assert_eq!(old_len, stash.len()); // all values where alreadt there + assert_eq!(old_len, stash.len()); // all values where already there old_len = stash.len(); let t7a: SimpleTerm<'static> = SimpleTerm::Triple(Box::new(["s", "p", "o"].map(SimpleTerm::from_term))); let t7b = stash.copy_term(&t7a); assert!(Term::eq(&t7a, &t7b)); - assert_eq!(old_len + 3, stash.len()); // all values where alreadt there + assert_eq!(old_len + 3, stash.len()); // all values where already there old_len = stash.len(); } } diff --git a/turtle/src/serializer/trig.rs b/turtle/src/serializer/trig.rs index 4fda58b5..921efd28 100644 --- a/turtle/src/serializer/trig.rs +++ b/turtle/src/serializer/trig.rs @@ -153,7 +153,7 @@ pub(crate) mod test { "#, r#"# blank node graph name PREFIX : - :lois :belives _:b. + :lois :believes _:b. GRAPH _:b1 { :clark a :Human } "#, r#"# blank node sharred across graphs diff --git a/typos.toml b/typos.toml new file mode 100644 index 00000000..d34a874d --- /dev/null +++ b/typos.toml @@ -0,0 +1,10 @@ +[default] +extend-ignore-identifiers-re = [ + # appear in several grammars + "PN_[A-Z_]+", + "pn_local", +] +extend-ignore-re = [ + "raison d'ĂȘtre", +] + diff --git a/xml/src/serializer.rs b/xml/src/serializer.rs index a606cb89..ec4f42f1 100644 --- a/xml/src/serializer.rs +++ b/xml/src/serializer.rs @@ -35,7 +35,7 @@ impl RdfXmlConfig { } /// Transform an [`RdfXmlConfig`] by setting the [`indentation`](RdfXmlConfig::indentation). - pub fn with_identation(mut self, i: usize) -> Self { + pub fn with_indentation(mut self, i: usize) -> Self { self.indentation = i; self } @@ -157,7 +157,7 @@ pub(crate) mod test { #[test] fn roundtrip_with_ident() -> Result<(), Box> { - let config = RdfXmlConfig::new().with_identation(4); + let config = RdfXmlConfig::new().with_indentation(4); for rdfxml in TESTS { println!("==========\n{}\n----------", rdfxml); let g1: Vec<[SimpleTerm; 3]> = crate::parser::parse_str(rdfxml).collect_triples()?;