From bcd77495493c5a92abe377b74730394260ff4ff4 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 26 Apr 2021 14:45:50 +0200 Subject: Add doc on default value helper functions Signed-off-by: Matthias Beyer --- src/config/util.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/config') diff --git a/src/config/util.rs b/src/config/util.rs index 4c1deff..132ae0d 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -11,14 +11,17 @@ //! This module contains default functions that are called by serde when deserializing the //! configuration and having to use default values. +/// The default progress bar format pub fn default_progress_format() -> String { String::from("[{elapsed_precise}] ({percent:>3}%): {bar:40.cyan/blue} | {msg}") } +/// The default spinner format pub fn default_spinner_format() -> String { String::from("[{elapsed_precise}] {spinner} | {msg}") } +/// The default format that is used to print one package pub fn default_package_print_format() -> String { String::from(indoc::indoc!( r#" @@ -83,14 +86,17 @@ pub fn default_package_print_format() -> String { )) } +/// The default value for whether strict script interpolation should be used pub fn default_strict_script_interpolation() -> bool { true } +/// The default value for the shebang pub fn default_script_shebang() -> String { String::from("#!/bin/bash") } +/// The default value for the number of log lines that should be printed if a build fails pub fn default_build_error_lines() -> usize { 10 } -- cgit v1.2.3