Skip to content

Commit ff3d3bc

Browse files
jcamielhurl-bot
authored andcommitted
Use super:: import for sibling modules.
1 parent 3719238 commit ff3d3bc

File tree

5 files changed

+20
-17
lines changed

5 files changed

+20
-17
lines changed

packages/hurl_core/src/ast/core.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
*/
1818
use std::fmt;
1919

20-
use crate::ast::option::EntryOption;
21-
use crate::ast::primitive::{
22-
Bytes, KeyValue, LineTerminator, SourceInfo, Template, Whitespace, I64,
23-
};
24-
use crate::ast::section::{
25-
Assert, Capture, Cookie, MultipartParam, RegexValue, Section, SectionValue,
26-
};
27-
use crate::ast::Placeholder;
2820
use crate::types::{SourceString, ToSource};
2921

22+
use super::option::EntryOption;
23+
use super::primitive::{
24+
Bytes, KeyValue, LineTerminator, Placeholder, SourceInfo, Template, Whitespace, I64,
25+
};
26+
use super::section::{Assert, Capture, Cookie, MultipartParam, RegexValue, Section, SectionValue};
27+
3028
/// Represents Hurl AST root node.
3129
#[derive(Clone, Debug, PartialEq, Eq)]
3230
pub struct HurlFile {
3331
pub entries: Vec<Entry>,
3432
pub line_terminators: Vec<LineTerminator>,
3533
}
3634

35+
/// Represents an entry; a request AST specification to be run and an optional response AST
36+
/// specification to be checked.
3737
#[derive(Clone, Debug, PartialEq, Eq)]
3838
pub struct Entry {
3939
pub request: Request,

packages/hurl_core/src/ast/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
* limitations under the License.
1616
*
1717
*/
18-
use crate::ast::primitive::Placeholder;
19-
use crate::ast::Template;
2018
use crate::types::{SourceString, ToSource};
2119

20+
use super::primitive::{Placeholder, Template};
21+
2222
/// This the AST for the JSON used within Hurl (for instance in [implicit JSON body request](https://hurl.dev/docs/request.html#json-body)).
2323
///
2424
/// # Example

packages/hurl_core/src/ast/option.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
*/
1818
use std::fmt;
1919

20-
use crate::ast::primitive::{
20+
use crate::types::{Count, Duration, SourceString, ToSource};
21+
22+
use super::primitive::{
2123
LineTerminator, Number, Placeholder, SourceInfo, Template, Whitespace, U64,
2224
};
23-
use crate::types::{Count, Duration, SourceString, ToSource};
2425

2526
#[derive(Clone, Debug, PartialEq, Eq)]
2627
pub struct EntryOption {

packages/hurl_core/src/ast/primitive.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
use std::fmt;
1919
use std::fmt::Formatter;
2020

21-
use crate::ast::JsonValue;
2221
use crate::reader::Pos;
2322
use crate::types::{SourceString, ToSource};
2423

24+
use super::json::JsonValue;
25+
2526
#[derive(Clone, Debug, PartialEq, Eq)]
2627
pub struct KeyValue {
2728
pub line_terminators: Vec<LineTerminator>,

packages/hurl_core/src/ast/section.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
*/
1818
use std::fmt;
1919

20-
use crate::ast::option::EntryOption;
21-
use crate::ast::primitive::{
20+
use crate::types::{SourceString, ToSource};
21+
22+
use super::core::Filter;
23+
use super::option::EntryOption;
24+
use super::primitive::{
2225
Base64, File, Hex, KeyValue, LineTerminator, MultilineString, Number, Placeholder, Regex,
2326
SourceInfo, Template, Whitespace,
2427
};
25-
use crate::ast::Filter;
26-
use crate::types::{SourceString, ToSource};
2728

2829
#[derive(Clone, Debug, PartialEq, Eq)]
2930
pub struct Section {

0 commit comments

Comments
 (0)