@@ -45,7 +45,13 @@ pub fn split_input(
45
45
if contains_main_method ( content) {
46
46
( manifest, path. clone ( ) , source. to_string ( ) , None , false )
47
47
} else {
48
- ( manifest, source_in_package, content. to_string ( ) , Some ( consts:: FILE_NO_MAIN_TEMPLATE ) , false )
48
+ (
49
+ manifest,
50
+ source_in_package,
51
+ content. to_string ( ) ,
52
+ Some ( consts:: FILE_NO_MAIN_TEMPLATE ) ,
53
+ false ,
54
+ )
49
55
}
50
56
}
51
57
Input :: Expr ( content) => (
@@ -83,12 +89,16 @@ pub fn split_input(
83
89
subs. insert ( consts:: SCRIPT_PRELUDE_SUB , & prelude_str[ ..] ) ;
84
90
}
85
91
86
- let source = template. map ( |template| templates:: expand ( template, & subs) ) . transpose ( ) ?;
92
+ let source = template
93
+ . map ( |template| templates:: expand ( template, & subs) )
94
+ . transpose ( ) ?;
87
95
let part_mani = part_mani. into_toml ( ) ?;
88
96
info ! ( "part_mani: {:?}" , part_mani) ;
89
97
info ! ( "source: {:?}" , source) ;
90
98
91
- let source_path_str = source_path. to_str ( ) . ok_or_else ( || format ! ( "Unable to stringify {source_path:?}" ) ) ?;
99
+ let source_path_str = source_path
100
+ . to_str ( )
101
+ . ok_or_else ( || format ! ( "Unable to stringify {source_path:?}" ) ) ?;
92
102
93
103
// It's-a mergin' time!
94
104
let def_mani = default_manifest ( input, bin_name, source_path_str, toolchain) ;
@@ -120,7 +130,16 @@ fn test_split_input() {
120
130
let toolchain = None ;
121
131
macro_rules! si {
122
132
( $i: expr) => {
123
- split_input( & $i, & [ ] , & [ ] , "" , & bin_name, & script_name, toolchain. clone( ) ) . ok( )
133
+ split_input(
134
+ & $i,
135
+ & [ ] ,
136
+ & [ ] ,
137
+ "" ,
138
+ & bin_name,
139
+ & script_name,
140
+ toolchain. clone( ) ,
141
+ )
142
+ . ok( )
124
143
} ;
125
144
}
126
145
0 commit comments