File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ pub struct CrateVersionPath {
1818}
1919
2020impl CrateVersionPath {
21+ pub async fn load_version ( & self , conn : & mut AsyncPgConnection ) -> AppResult < Version > {
22+ Ok ( self . load_version_and_crate ( conn) . await ?. 0 )
23+ }
24+
2125 pub async fn load_version_and_crate (
2226 & self ,
2327 conn : & mut AsyncPgConnection ,
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ pub async fn get_version_downloads(
5959 }
6060
6161 let mut conn = app. db_read ( ) . await ?;
62- let ( version, _ ) = path. load_version_and_crate ( & mut conn) . await ?;
62+ let version = path. load_version ( & mut conn) . await ?;
6363
6464 let cutoff_end_date = req
6565 . query ( )
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ pub async fn get_version_dependencies(
6161 }
6262
6363 let mut conn = state. db_read ( ) . await ?;
64- let ( version, _ ) = path. load_version_and_crate ( & mut conn) . await ?;
64+ let version = path. load_version ( & mut conn) . await ?;
6565
6666 let deps = Dependency :: belonging_to ( & version)
6767 . inner_join ( crates:: table)
You can’t perform that action at this time.
0 commit comments