Skip to content

Commit

Permalink
Merge remote-tracking branch 'audunhalland/spanning-span' into spanni…
Browse files Browse the repository at this point in the history
…ng-span

# Conflicts:
#	juniper/CHANGELOG.md
#	juniper/src/parser/document.rs
#	juniper/src/parser/parser.rs
#	juniper/src/parser/utils.rs
  • Loading branch information
tyranron committed Nov 9, 2023
2 parents 1c5874e + 70cd07b commit 8816297
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion juniper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ All user visible changes to `juniper` crate will be documented in this file. Thi
- Removed lifetime parameter from `ParseError`, `GraphlQLError`, `GraphQLBatchRequest` and `GraphQLRequest`. ([#1081], [#528])
- Upgraded [GraphiQL] to 3.0.9 version (requires new [`graphql-transport-ws` GraphQL over WebSocket Protocol] integration on server, see `juniper_warp/examples/subscription.rs`). ([#1188], [#1193], [#1204])
- Made `LookAheadMethods::children()` method to return slice instead of `Vec`. ([#1200])
- Abstracted `Spanning::start` and `Spanning::end` fields into separate struct `Span`. ([#1207])
- Abstracted `Spanning::start` and `Spanning::end` fields into separate struct `Span`. ([#1207], [#1208])

### Added

Expand Down Expand Up @@ -133,6 +133,7 @@ All user visible changes to `juniper` crate will be documented in this file. Thi
[#1200]: /../../pull/1200
[#1204]: /../../pull/1204
[#1207]: /../../pull/1207
[#1208]: /../../pull/1208
[ba1ed85b]: /../../commit/ba1ed85b3c3dd77fbae7baf6bc4e693321a94083
[CVE-2022-31173]: /../../security/advisories/GHSA-4rx6-g5vg-5f3j

Expand Down
10 changes: 5 additions & 5 deletions juniper/src/parser/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ impl Span {
}
}

/// Data structure used to wrap items with start and end markers in the input source
#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy)]
/// Data structure used to wrap items into a [`Span`].
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct Spanning<T> {
/// The wrapped item
/// Wrapped item.
pub item: T,

/// The span
/// [`Span`] of the wrapped item.
pub span: Span,
}

impl<T> Spanning<T> {
#[doc(hidden)]
pub fn new(span: Span, item: T) -> Spanning<T> {
pub fn new(span: Span, item: T) -> Self {
Self { item, span }
}

Expand Down

0 comments on commit 8816297

Please sign in to comment.