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

implement Copy for Position and Span #534

Merged
merged 2 commits into from
Aug 28, 2021
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 pest/src/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use core::str;
use span;

/// A cursor position in a `&str` which provides useful methods to manually parse that string.
#[derive(Clone)]
#[derive(Clone, Copy)]
pub struct Position<'i> {
input: &'i str,
/// # Safety:
Expand Down
2 changes: 1 addition & 1 deletion pest/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use position;
///
/// [two `Position`s]: struct.Position.html#method.span
/// [`Pair`]: ../iterators/struct.Pair.html#method.span
#[derive(Clone)]
#[derive(Clone, Copy)]
pub struct Span<'i> {
input: &'i str,
/// # Safety
Expand Down