Skip to content

Commit 28428e5

Browse files
committed
Go ahead and publish &Path iterator function
I don't think 0.2 is happening, so let's not wait for it.
1 parent 3cef693 commit 28428e5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/lib.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ pub struct ProbeResult {
1616
/// found.
1717
///
1818
/// This will only search known system locations.
19+
#[doc(hidden)]
20+
#[deprecated(note = "use `candidate_cert_dirs` instead")]
1921
pub fn find_certs_dirs() -> Vec<PathBuf> {
20-
cert_dirs_iter().map(Path::to_path_buf).collect()
22+
candidate_cert_dirs().map(Path::to_path_buf).collect()
2123
}
2224

23-
// TODO: when we bump to 0.2, make this the `find_certs_dirs` function
24-
fn cert_dirs_iter() -> impl Iterator<Item = &'static Path> {
25+
/// Probe the system for the directory in which CA certificates should likely be
26+
/// found.
27+
///
28+
/// This will only search known system locations.
29+
pub fn candidate_cert_dirs() -> impl Iterator<Item = &'static Path> {
2530
// see http://gagravarr.org/writing/openssl-certs/others.shtml
2631
[
2732
"/var/ssl",
@@ -161,7 +166,7 @@ fn probe_from_env() -> ProbeResult {
161166
/// The probe result is returned as a [`ProbeResult`] structure here.
162167
pub fn probe() -> ProbeResult {
163168
let mut result = probe_from_env();
164-
for certs_dir in cert_dirs_iter() {
169+
for certs_dir in candidate_cert_dirs() {
165170
// cert.pem looks to be an openssl 1.0.1 thing, while
166171
// certs/ca-certificates.crt appears to be a 0.9.8 thing
167172
let cert_filenames = [

0 commit comments

Comments
 (0)