We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efc9ac0 commit de8efb0Copy full SHA for de8efb0
1 file changed
src-tauri/src/enterprise/provisioning/mod.rs
@@ -1,4 +1,4 @@
1
-use std::{fs, path::Path};
+use std::{fmt, fs, path::Path};
2
3
use serde::{Deserialize, Serialize};
4
use tauri::{AppHandle, Manager};
@@ -7,12 +7,26 @@ use crate::database::{models::instance::Instance, DB_POOL};
7
8
const CONFIG_FILE_NAME: &str = "provisioning.json";
9
10
-#[derive(Clone, Debug, Deserialize, Serialize)]
+#[derive(Clone, Deserialize, Serialize)]
11
pub struct ProvisioningConfig {
12
pub enrollment_url: String,
13
pub enrollment_token: String,
14
}
15
16
+impl fmt::Debug for ProvisioningConfig {
17
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18
+ let Self {
19
+ enrollment_url,
20
+ enrollment_token: _,
21
+ } = self;
22
+
23
+ f.debug_struct("ProvisioningConfig")
24
+ .field("enrollment_url", enrollment_url)
25
+ .field("enrollment_token", &"***")
26
+ .finish()
27
+ }
28
+}
29
30
impl ProvisioningConfig {
31
/// Load configuration from a file at `path`.
32
fn load(path: &Path) -> Option<Self> {
0 commit comments