diff --git a/src/base/spec.rs b/src/base/spec.rs index 848ee2ed8..1ba9ffe7d 100644 --- a/src/base/spec.rs +++ b/src/base/spec.rs @@ -18,16 +18,6 @@ pub trait SpecFormatter { fn format(&self, mode: OutputMode) -> String; } -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(tag = "kind")] -pub enum SpecString { - /// The value comes from the environment variable. - Env(String), - /// The value is defined by the literal string. - #[serde(untagged)] - Literal(String), -} - pub type ScopeName = String; /// Used to identify a data field within a flow. diff --git a/src/lib_context.rs b/src/lib_context.rs index 647052e77..26c70e9b7 100644 --- a/src/lib_context.rs +++ b/src/lib_context.rs @@ -122,7 +122,7 @@ impl FlowContext { pub async fn use_execution_ctx( &self, - ) -> Result> { + ) -> Result> { let execution_ctx = self.execution_ctx.read().await; if !execution_ctx.setup_change.is_up_to_date() { api_bail!( diff --git a/src/utils/db.rs b/src/utils/db.rs index 0c643c2df..36a2d861c 100644 --- a/src/utils/db.rs +++ b/src/utils/db.rs @@ -1,32 +1,3 @@ -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ValidIdentifier(pub String); - -impl TryFrom for ValidIdentifier { - type Error = anyhow::Error; - - fn try_from(s: String) -> Result { - if !s.is_empty() && s.chars().all(|c| c.is_alphanumeric() || c == '_') { - Ok(ValidIdentifier(s)) - } else { - Err(anyhow::anyhow!("Invalid identifier: {s:?}")) - } - } -} - -impl std::fmt::Display for ValidIdentifier { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - std::fmt::Display::fmt(&self.0, f) - } -} - -impl std::ops::Deref for ValidIdentifier { - type Target = String; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - pub enum WriteAction { Insert, Update,