Skip to content

Commit 9a8531f

Browse files
committed
style: rename source arguments to src for coherency with the rest of the code.
1 parent 53dc47e commit 9a8531f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

parser/src/ast/cst2ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ impl<'src, I> Builder<'src, I>
4343
where
4444
I: Iterator<Item = Event>,
4545
{
46-
pub fn new(source: &'src [u8], events: I) -> Self {
46+
pub fn new(src: &'src [u8], events: I) -> Self {
4747
Self {
48-
source,
48+
source: src,
4949
events: events.peekable(),
5050
errors: Vec::new(),
5151
depth: 0,

parser/src/ast/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ where
6464

6565
impl<'src> AST<'src> {
6666
fn new<I: Iterator<Item = Event>>(
67-
source: &'src [u8],
67+
src: &'src [u8],
6868
events: I,
6969
) -> AST<'src> {
70-
Builder::new(source, events).build_ast()
70+
Builder::new(src, events).build_ast()
7171
}
7272

7373
/// Returns the top level items in the AST.

0 commit comments

Comments
 (0)