Skip to content

Commit

Permalink
remove educe crate
Browse files Browse the repository at this point in the history
  • Loading branch information
xeniape committed Dec 18, 2024
1 parent 1737070 commit 9f49e3c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
5 changes: 2 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions Cargo.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ base64 = "0.22"
built = { version = "0.7", features = ["chrono", "git2"] }
byteorder = "1.5"
clap = "4.5"
educe = { version = "0.6.0", default-features = false, features = ["Default"] }
flate2 = "1.0"
fnv = "1.0"
futures = { version = "0.3" }
Expand Down
1 change: 0 additions & 1 deletion rust/crd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ repository.workspace = true
publish = false

[dependencies]
educe.workspace = true
semver.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
13 changes: 9 additions & 4 deletions rust/crd/src/user_info_fetcher.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::collections::BTreeMap;

use educe::Educe;
use serde::{Deserialize, Serialize};
use stackable_operator::{
commons::{networking::HostName, tls_verification::TlsClientDetails},
Expand Down Expand Up @@ -115,12 +114,10 @@ pub struct ActiveDirectoryBackend {
pub custom_attribute_mappings: BTreeMap<String, String>,
}

#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize, Educe)]
#[educe(Default)]
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Cache {
/// How long metadata about each user should be cached for.
#[educe(Default = Cache::default_entry_time_to_live())]
#[serde(default = "Cache::default_entry_time_to_live")]
pub entry_time_to_live: Duration,
}
Expand All @@ -130,3 +127,11 @@ impl Cache {
Duration::from_minutes_unchecked(1)
}
}

impl Default for Cache {
fn default() -> Self {
Self {
entry_time_to_live: Self::default_entry_time_to_live(),
}
}
}

0 comments on commit 9f49e3c

Please sign in to comment.