Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/base/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/lib_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl FlowContext {

pub async fn use_execution_ctx(
&self,
) -> Result<tokio::sync::RwLockReadGuard<FlowExecutionContext>> {
) -> Result<tokio::sync::RwLockReadGuard<'_, FlowExecutionContext>> {
let execution_ctx = self.execution_ctx.read().await;
if !execution_ctx.setup_change.is_up_to_date() {
api_bail!(
Expand Down
29 changes: 0 additions & 29 deletions src/utils/db.rs
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ValidIdentifier(pub String);

impl TryFrom<String> for ValidIdentifier {
type Error = anyhow::Error;

fn try_from(s: String) -> Result<Self, Self::Error> {
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,
Expand Down
Loading