@@ -64,8 +64,8 @@ impl GitHubHeaders for RequestBuilder {
6464 }
6565}
6666
67- /// Gets a release from GitHub for a given [` version` ](Version) of PostgreSQL. If a release for the
68- /// [` version` ](Version) is not found, then a [` ReleaseNotFound` ] error is returned.
67+ /// Gets a release from GitHub for a given [version](Version) of PostgreSQL. If a release for the
68+ /// [version](Version) is not found, then a [ReleaseNotFound] error is returned.
6969async fn get_release ( version : & Version ) -> Result < Release > {
7070 let url = "https://api.github.com/repos/theseus-rs/postgresql-binaries/releases" ;
7171 let client = reqwest:: Client :: new ( ) ;
@@ -127,16 +127,18 @@ async fn get_release(version: &Version) -> Result<Release> {
127127 }
128128}
129129
130- /// Gets the version of PostgreSQL for the specified [` version` ](Version). If the version minor or release is not
131- /// specified, then the latest version is returned. If a release for the [` version` ](Version) is not found, then a
132- /// [` ReleaseNotFound` ] error is returned.
130+ /// Gets the version of PostgreSQL for the specified [version](Version). If the version minor or release is not
131+ /// specified, then the latest version is returned. If a release for the [version](Version) is not found, then a
132+ /// [ReleaseNotFound] error is returned.
133133pub async fn get_version ( version : & Version ) -> Result < Version > {
134134 let release = get_release ( version) . await ?;
135135 Version :: from_str ( & release. tag_name )
136136}
137137
138- /// Gets the assets for a given [`version`](Version) of PostgreSQL and `target` (e.g. `x86_64-unknown-linux-gnu`).
139- /// If the [`version`](Version) or `target` is not found, then an [error](crate::error::ArchiveError) is returned.
138+ /// Gets the assets for a given [version](Version) of PostgreSQL and
139+ /// [target](https://doc.rust-lang.org/nightly/rustc/platform-support.html).
140+ /// If the [version](Version) or [target](https://doc.rust-lang.org/nightly/rustc/platform-support.html)
141+ /// is not found, then an [error](crate::error::ArchiveError) is returned.
140142///
141143/// Two assets are returned. The first [asset](Asset) is the archive, and the second [asset](Asset) is the archive hash.
142144async fn get_asset < S : AsRef < str > > ( version : & Version , target : S ) -> Result < ( Version , Asset , Asset ) > {
@@ -166,16 +168,19 @@ async fn get_asset<S: AsRef<str>>(version: &Version, target: S) -> Result<(Versi
166168 }
167169}
168170
169- /// Gets the archive for a given [`version`](Version) of PostgreSQL for the current target.
170- /// If the [`version`](Version) is not found for this target, then an [error](crate::error::ArchiveError) is returned.
171+ /// Gets the archive for a given [version](Version) of PostgreSQL for the current target.
172+ /// If the [version](Version) is not found for this target, then an
173+ /// [error](crate::error::ArchiveError) is returned.
171174///
172175/// Returns the archive bytes and the archive hash.
173176pub async fn get_archive ( version : & Version ) -> Result < ( Version , Bytes , String ) > {
174177 get_archive_for_target ( version, target_triple:: TARGET ) . await
175178}
176179
177- /// Gets the archive for a given [`version`](Version) of PostgreSQL and `target` (e.g. `x86_64-unknown-linux-gnu`).
178- /// If the [`version`](Version) or `target` is not found, then an [error](crate::error::ArchiveError) is returned.
180+ /// Gets the archive for a given [version](Version) of PostgreSQL and
181+ /// [target](https://doc.rust-lang.org/nightly/rustc/platform-support.html).
182+ /// If the [version](Version) or [target](https://doc.rust-lang.org/nightly/rustc/platform-support.html)
183+ /// is not found, then an [error](crate::error::ArchiveError) is returned.
179184///
180185/// Returns the archive bytes and the archive hash.
181186pub async fn get_archive_for_target < S : AsRef < str > > (
@@ -220,7 +225,7 @@ pub async fn get_archive_for_target<S: AsRef<str>>(
220225 Ok ( ( asset_version, archive, hash) )
221226}
222227
223- /// Extracts the compressed tar ` bytes` to the ` out_dir` .
228+ /// Extracts the compressed tar [ bytes](Bytes) to the [ out_dir](Path) .
224229pub async fn extract ( bytes : & Bytes , out_dir : & Path ) -> Result < ( ) > {
225230 let input = BufReader :: new ( Cursor :: new ( bytes) ) ;
226231 let decoder = GzDecoder :: new ( input) ;
0 commit comments