File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
rust/stackablectl/src/output Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 1+ //! This module contains helper structs and functions to render the CLI output
2+ //! based on templates. These templates allow dynamic composition of the output.
3+ //! The output offers sections for pre, post and command hints, as well as
4+ //! success and error output. The [`ErrorReport`] serves as an alternative to
5+ //! snafu's [`Report`](snafu::Report).
6+
17use std:: {
28 fmt:: Write ,
39 ops:: { Deref , DerefMut } ,
5965 let mut index = 1 ;
6066
6167 while let Some ( source) = error. source ( ) {
62- let source_string = source. to_string ( ) ;
63-
64- let cleaned = if let Some ( ( cleaned, _) ) = source_string. split_once ( ':' ) {
65- cleaned
66- } else {
67- & source_string
68- } ;
69-
70- writeln ! ( report, " {}: {}" , index, cleaned) ?;
71-
68+ writeln ! ( report, " {}: {}" , index, source) ?;
7269 error = source;
7370 index += 1 ;
7471 }
You can’t perform that action at this time.
0 commit comments