Skip to content

Commit

Permalink
Move struct definition above impl block
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Jul 3, 2024
1 parent a5f46f6 commit f9bf59f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ fn load_certs_from_env() -> Result<Option<Vec<CertificateDer<'static>>>, Error>
})
}

struct CertPaths {
file: Option<PathBuf>,
dir: Option<PathBuf>,
}

impl CertPaths {
fn from_env() -> Self {
Self {
Expand All @@ -173,11 +178,6 @@ impl CertPaths {
}
}

struct CertPaths {
file: Option<PathBuf>,
dir: Option<PathBuf>,
}

fn load_pem_certs(path: &Path) -> Result<Vec<CertificateDer<'static>>, Error> {
let mut f = BufReader::new(File::open(path)?);
rustls_pemfile::certs(&mut f)
Expand Down

0 comments on commit f9bf59f

Please sign in to comment.