Skip to content

Commit

Permalink
docs: fix typos and spelling errors (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 authored Aug 4, 2024
1 parent 0397080 commit 80ffd2e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions serde_json_path/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All noteable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Expand Down Expand Up @@ -101,7 +101,7 @@ The `LocatedNodeList` provides one unique bit of functionality over `NodeList`:

- **documentation**: Add line describing Descendant Operator ([#53])
- **documentation**: Improve example in Filter Selector section of main docs ([#54])
- **documentation**: Improve examples in Slice Slector section of main docs ([#55])
- **documentation**: Improve examples in Slice Selector section of main docs ([#55])
- **documentation**: Other improvements to documentation ([#56])
- **fixed**: Formulate the regex used by the `match` function to correctly handle regular expressions with leading or trailing `|` characters ([#61])

Expand Down Expand Up @@ -236,7 +236,7 @@ This split was done to accommodate the new `#[function]` attribute macro, which

# 0.5.3 (14 March 2023)

- **fixed:** Fix serialization behaviour of `NodeList` ([#30])
- **fixed:** Fix serialization behavior of `NodeList` ([#30])

[#30]: https://github.com/hiltontj/serde_json_path/pull/30

Expand Down
2 changes: 1 addition & 1 deletion serde_json_path/src/parser/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ mod tests {
}

#[test]
fn descendant_semgent() {
fn descendant_segment() {
{
let (_, sk) = parse_descendant_segment("..['name']").unwrap();
let s = sk.as_long_hand().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion serde_json_path_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All noteable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Expand Down
4 changes: 2 additions & 2 deletions serde_json_path_core/src/spec/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
//! ## `count`
//!
//! The `count` function extension provides a way to obtain the number of nodes in a nodelist and
//! make that available for further processing inthe filter expression.
//! make that available for further processing in the filter expression.
//!
//! ### Parameters
//!
Expand Down Expand Up @@ -185,7 +185,7 @@ impl Function {
#[cfg(feature = "functions")]
inventory::collect!(Function);

/// JSONPath type epresenting a Nodelist
/// JSONPath type representing a Nodelist
///
/// This is a thin wrapper around a [`NodeList`], and generally represents the result of a JSONPath
/// query. It may also be produced by a function.
Expand Down
16 changes: 8 additions & 8 deletions serde_json_path_core/src/spec/integer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Representation of itegers in the JSONPath specification
//! Representation of integers in the JSONPath specification
//!
//! The JSONPath specification defines some rules for integers used in query strings (see [here][spec]).
//!
Expand All @@ -11,7 +11,7 @@ use std::{

/// An integer for internet JSON ([RFC7493][ijson])
///
/// The value must be within the range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1]).
/// The value must be within the range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1].
///
/// [ijson]: https://www.rfc-editor.org/rfc/rfc7493#section-2.2
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
Expand Down Expand Up @@ -47,34 +47,34 @@ impl Integer {
/// # Panics
///
/// This will panic if the inputted value is out of the valid range
/// [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1]).
/// [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1].
pub fn from_i64_unchecked(value: i64) -> Self {
Self::try_new(value).expect("value is out of the valid range")
}

/// Take the absolute value, producing `None` if the resulting value is outside
/// the valid range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1]).
/// the valid range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1].
pub fn checked_abs(mut self) -> Option<Self> {
self.0 = self.0.checked_abs()?;
self.check().then_some(self)
}

/// Add the two values, producing `None` if the resulting value is outside the
/// valid range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1]).
/// valid range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1].
pub fn checked_add(mut self, rhs: Self) -> Option<Self> {
self.0 = self.0.checked_add(rhs.0)?;
self.check().then_some(self)
}

/// Subtract the `rhs` from `self`, producing `None` if the resulting value is
/// outside the valid range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1]).
/// outside the valid range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1].
pub fn checked_sub(mut self, rhs: Self) -> Option<Self> {
self.0 = self.0.checked_sub(rhs.0)?;
self.check().then_some(self)
}

/// Multiply the two values, producing `None` if the resulting value is outside
/// the valid range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1]).
/// the valid range [-(2<sup>53</sup>)+1, (2<sup>53</sup>)-1].
pub fn checked_mul(mut self, rhs: Self) -> Option<Self> {
self.0 = self.0.checked_mul(rhs.0)?;
self.check().then_some(self)
Expand Down Expand Up @@ -136,7 +136,7 @@ impl PartialOrd<i64> for Integer {
/// An error for the [`Integer`] type
#[derive(Debug, thiserror::Error)]
pub enum IntegerError {
/// The provided value was outside the valid range [-(2**53)+1, (2**53)-1])
/// The provided value was outside the valid range [-(2**53)+1, (2**53)-1]
#[error("the provided integer was outside the valid range, see https://www.rfc-editor.org/rfc/rfc9535.html#section-2.1-4.1")]
OutOfBounds,
/// Integer parsing error
Expand Down
2 changes: 1 addition & 1 deletion serde_json_path_core/src/spec/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl std::fmt::Display for QuerySegment {
pub enum QuerySegmentKind {
/// A normal child
///
/// Addresses the direct descented of the preceding segment
/// Addresses the direct descendant of the preceding segment
Child,
/// A descendant child
///
Expand Down
2 changes: 1 addition & 1 deletion serde_json_path_core/src/spec/selector/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl Queryable for Filter {

/// The top level boolean expression type
///
/// This is also `ligical-expression` in the JSONPath specification, but the naming was chosen to
/// This is also `logical-expression` in the JSONPath specification, but the naming was chosen to
/// make it more clear that it represents the logical OR, and to not have an extra wrapping type.
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct LogicalOrExpr(pub Vec<LogicalAndExpr>);
Expand Down

0 comments on commit 80ffd2e

Please sign in to comment.