Skip to content

Commit

Permalink
Move struct Document inside mod document
Browse files Browse the repository at this point in the history
I expect there will be other document-level types soon.
  • Loading branch information
scouten committed Dec 30, 2023
1 parent af916e2 commit af0f3dd
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 10 deletions.
File renamed without changes.
4 changes: 4 additions & 0 deletions src/document/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//! Describes the top-level document structure.

mod document;
pub use document::Document;
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

pub mod blocks;

mod document;
pub use document::Document;
pub mod document;

mod error;
pub use error::{Error, ParseResult};
Expand Down
5 changes: 3 additions & 2 deletions src/tests/asciidoc_lang/root/document_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ mod documents {
use pretty_assertions_sorted::assert_eq;

use crate::{
document::Document,
tests::fixtures::{
blocks::{TBlock, TSimpleBlock},
TDocument, TSpan,
document::TDocument,
TSpan,
},
Document,
};

#[test]
Expand Down
5 changes: 3 additions & 2 deletions src/tests/document.rs → src/tests/document/document.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use pretty_assertions_sorted::assert_eq;

use crate::{
document::Document,
tests::fixtures::{
blocks::{TBlock, TSimpleBlock},
TDocument, TSpan,
document::TDocument,
TSpan,
},
Document,
};

#[test]
Expand Down
1 change: 1 addition & 0 deletions src/tests/document/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod document;
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::{cmp::PartialEq, fmt};

use crate::{
document::Document,
tests::fixtures::{blocks::TBlock, TSpan},
Document,
};

// Approximate mock of Document type that we can use
Expand Down
2 changes: 2 additions & 0 deletions src/tests/fixtures/document/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mod document;
pub(crate) use document::TDocument;
4 changes: 1 addition & 3 deletions src/tests/fixtures/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use std::{env, path::PathBuf};

pub(crate) mod blocks;

mod document;
pub(crate) use document::TDocument;
pub(crate) mod document;

mod span;
pub(crate) use span::TSpan;
Expand Down

0 comments on commit af0f3dd

Please sign in to comment.