Skip to content

Commit

Permalink
Unsupported platforms default to the mock backend so we always compile.
Browse files Browse the repository at this point in the history
Closes: #127
  • Loading branch information
phlip9 committed May 22, 2023
1 parent 6d3b0e8 commit 9390b57
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,19 @@ pub mod credential;
pub mod error;
pub mod mock;

// Unsupported platforms use the mock backend as default. That way the crate
// always compiles, but the user must provide their own backend to actually
// persist keys.

#[cfg(not(any(
target_os = "linux",
target_os = "freebsd",
target_os = "macos",
target_os = "ios",
target_os = "windows",
)))]
use mock as default;

#[derive(Default, Debug)]
struct EntryBuilder {
inner: Option<Box<CredentialBuilder>>,
Expand Down

0 comments on commit 9390b57

Please sign in to comment.