File tree Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ fn check_updates(cfg: &Cfg) -> Result<()> {
784
784
( ref name, Ok ( ref toolchain) ) => {
785
785
let distributable = DistributableToolchain :: new ( & toolchain) ?;
786
786
let current_version = distributable. show_version ( ) ?;
787
- let dist_version = toolchain . show_dist_version ( ) ?;
787
+ let dist_version = distributable . show_dist_version ( ) ?;
788
788
let _ = t. attr ( term2:: Attr :: Bold ) ;
789
789
write ! ( t, "{} - " , name) ?;
790
790
match ( current_version, dist_version) {
Original file line number Diff line number Diff line change @@ -496,19 +496,6 @@ impl<'a> Toolchain<'a> {
496
496
} )
497
497
}
498
498
// Distributable only. Installed only.
499
- pub fn show_dist_version ( & self ) -> Result < Option < String > > {
500
- let update_hash = self . update_hash ( ) ?;
501
-
502
- match crate :: dist:: dist:: dl_v2_manifest (
503
- self . download_cfg ( ) ,
504
- update_hash. as_ref ( ) . map ( |p| & * * p) ,
505
- & self . desc ( ) ?,
506
- ) ? {
507
- Some ( ( manifest, _) ) => Ok ( Some ( manifest. get_rust_version ( ) ?. to_string ( ) ) ) ,
508
- None => Ok ( None ) ,
509
- }
510
- }
511
- // Distributable only. Installed only.
512
499
pub fn list_components ( & self ) -> Result < Option < Vec < ComponentStatus > > > {
513
500
if !self . exists ( ) {
514
501
return Err ( ErrorKind :: ToolchainNotInstalled ( self . name . to_owned ( ) ) . into ( ) ) ;
@@ -894,6 +881,20 @@ impl<'a> DistributableToolchain<'a> {
894
881
}
895
882
}
896
883
884
+ // Installed only.
885
+ pub fn show_dist_version ( & self ) -> Result < Option < String > > {
886
+ let update_hash = self . 0 . update_hash ( ) ?;
887
+
888
+ match crate :: dist:: dist:: dl_v2_manifest (
889
+ self . 0 . download_cfg ( ) ,
890
+ update_hash. as_ref ( ) . map ( |p| & * * p) ,
891
+ & self . 0 . desc ( ) ?,
892
+ ) ? {
893
+ Some ( ( manifest, _) ) => Ok ( Some ( manifest. get_rust_version ( ) ?. to_string ( ) ) ) ,
894
+ None => Ok ( None ) ,
895
+ }
896
+ }
897
+
897
898
// Installed only.
898
899
pub fn show_version ( & self ) -> Result < Option < String > > {
899
900
match self . get_manifest ( ) ? {
You can’t perform that action at this time.
0 commit comments