File tree 2 files changed +3
-4
lines changed 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ pub fn main() {
182
182
}
183
183
184
184
let mut builder = RustwideBuilder :: init ( ) . unwrap ( ) ;
185
- builder. add_essential_files ( ) . expect ( "failed to add essential files" ) ;
185
+ builder. update_toolchain ( ) . expect ( "failed to add essential files" ) ;
186
186
} else if let Some ( _) = matches. subcommand_matches ( "lock" ) {
187
187
docbuilder. lock ( ) . expect ( "Failed to lock" ) ;
188
188
} else if let Some ( _) = matches. subcommand_matches ( "unlock" ) {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ impl RustwideBuilder {
93
93
} )
94
94
}
95
95
96
- fn update_toolchain ( & mut self ) -> Result < ( ) > {
96
+ pub fn update_toolchain ( & mut self ) -> Result < ( ) > {
97
97
// Ignore errors if detection fails.
98
98
let old_version = self . detect_rustc_version ( ) . ok ( ) ;
99
99
@@ -112,7 +112,6 @@ impl RustwideBuilder {
112
112
113
113
fn detect_rustc_version ( & self ) -> Result < String > {
114
114
info ! ( "detecting rustc's version..." ) ;
115
- self . toolchain . install ( & self . workspace ) ?;
116
115
let res = Command :: new ( & self . workspace , self . toolchain . rustc ( ) )
117
116
. args ( & [ "--version" ] )
118
117
. log_output ( false )
@@ -128,7 +127,7 @@ impl RustwideBuilder {
128
127
}
129
128
}
130
129
131
- pub fn add_essential_files ( & mut self ) -> Result < ( ) > {
130
+ fn add_essential_files ( & mut self ) -> Result < ( ) > {
132
131
self . rustc_version = self . detect_rustc_version ( ) ?;
133
132
let rustc_version = parse_rustc_version ( & self . rustc_version ) ?;
134
133
You can’t perform that action at this time.
0 commit comments