Skip to content

Commit 3a895d4

Browse files
a-frantzpeterhuene
andauthored
fix: 'new()' method for format Config Builder (#223)
Co-authored-by: Peter Huene <peter@huene.dev>
1 parent b5caa3a commit 3a895d4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

wdl-format/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "wdl-format"
33
version = "0.2.0"
4+
description = "Formatting of WDL (Workflow Description Language) documents"
45
license.workspace = true
56
edition.workspace = true
67
authors.workspace = true

wdl-format/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub use builder::Builder;
77
pub use indent::Indent;
88

99
/// Configuration for formatting.
10-
#[derive(Debug, Default)]
10+
#[derive(Clone, Copy, Debug, Default)]
1111
pub struct Config {
1212
/// The number of characters to indent.
1313
indent: Indent,

wdl-format/src/config/builder.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ pub struct Builder {
3333
}
3434

3535
impl Builder {
36+
/// Creates a new builder with default values.
37+
pub fn new() -> Self {
38+
Default::default()
39+
}
40+
3641
/// Sets the indentation level.
3742
///
3843
/// # Notes

0 commit comments

Comments
 (0)