@@ -25,7 +25,6 @@ extern crate structopt;
2525extern crate tar;
2626extern crate tee;
2727extern crate tempdir;
28- extern crate toml;
2928extern crate xz2;
3029
3130use std:: env;
@@ -50,7 +49,6 @@ use structopt::StructOpt;
5049use tar:: Archive ;
5150use tee:: TeeReader ;
5251use tempdir:: TempDir ;
53- use toml:: Value ;
5452use xz2:: read:: XzDecoder ;
5553
5654/// The first commit which build artifacts are made available through the CI for
@@ -197,33 +195,15 @@ impl Bound {
197195 Bound :: Commit ( commit) => Ok ( Bound :: Commit ( commit) ) ,
198196 Bound :: Date ( date) => {
199197 let date_str = date. format ( "%Y-%m-%d" ) ;
200- let url = format ! ( "{}/{}/channel-rust-nightly.toml " , NIGHTLY_SERVER , date_str) ;
198+ let url = format ! ( "{}/{}/channel-rust-nightly-git-commit-hash.txt " , NIGHTLY_SERVER , date_str) ;
201199
202200 eprintln ! ( "fetching {}" , url) ;
203201 let client = Client :: new ( ) ;
204202 let name = format ! ( "nightly manifest {}" , date_str) ;
205203 let ( response, mut bar) = download_progress ( & client, & name, & url) ?;
206204 let mut response = TeeReader :: new ( response, & mut bar) ;
207- let mut toml_buf = String :: new ( ) ;
208- response. read_to_string ( & mut toml_buf) ?;
209-
210- let manifest = toml_buf. parse :: < Value > ( ) . unwrap ( ) ;
211-
212- let commit = match manifest {
213- Value :: Table ( t) => match t. get ( "pkg" ) {
214- Some ( & Value :: Table ( ref t) ) => match t. get ( "rust" ) {
215- Some ( & Value :: Table ( ref t) ) => match t. get ( "git_commit_hash" ) {
216- Some ( & Value :: String ( ref hash) ) => hash. to_owned ( ) ,
217- _ => bail ! (
218- "not a rustup manifest (no valid git_commit_hash key under rust"
219- ) ,
220- } ,
221- _ => bail ! ( "not a rustup manifest (no rust key under pkg)" ) ,
222- } ,
223- _ => bail ! ( "not a rustup manifest (missing pkg key)" ) ,
224- } ,
225- _ => bail ! ( "not a rustup manifest (not a table at root)" ) ,
226- } ;
205+ let mut commit = String :: new ( ) ;
206+ response. read_to_string ( & mut commit) ?;
227207
228208 eprintln ! ( "converted {} to {}" , date_str, commit) ;
229209
0 commit comments