Skip to content

Commit

Permalink
Upgrade tailcall valid
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Dec 9, 2024
1 parent f9ef239 commit 4f8a79b
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ derive_more = { version = "1", features = ["from", "debug"] }
thiserror = "1.0.59"
url = { version = "2.5.0", features = ["serde"] }
convert_case = "0.6.0"
tailcall-valid = "0.1.1"
tailcall-valid = "0.1.3"

[dependencies]
# dependencies specific to CLI must have optional = true and the dep should be added to default feature.
Expand Down
2 changes: 1 addition & 1 deletion src/core/blueprint/operators/enum_alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn update_enum_alias<'a>() -> TryFold<
let enum_type = config.enums.get(field.type_of.name());
if let Some(enum_type) = enum_type {
let has_alias = enum_type.variants.iter().any(|v| v.alias.is_some());
if !has_alias {
if (!has_alias) {
return Valid::succeed(b_field);
}
let mut map = HashMap::<String, String>::new();
Expand Down
2 changes: 1 addition & 1 deletion src/core/config/transformer/rename_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl Transform for RenameTypes {
.collect();
}

config
Valid::succeed(config)
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/generator/proto/connect_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Transform for ConnectRPC {
}
}

Valid::succeed(config)
Valid::success(config)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/jit/transform/auth_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl<A: Debug> Transform for AuthPlanner<A> {
.reduce(|a, b| a.and(b))
.map(|auth| IR::Protect(auth, Box::new(IR::Dynamic(DynamicValue::default()))));

Valid::succeed(plan)
Valid::ok(plan)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/jit/transform/check_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ impl<A> Transform for CheckCache<A> {

plan.min_cache_ttl = ttl;

Valid::succeed(plan)
Valid::ok(plan)
}
}
2 changes: 1 addition & 1 deletion src/core/jit/transform/check_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ impl<A> Transform for CheckConst<A> {

plan.is_const = is_const;

Valid::succeed(plan)
Valid::ok(plan)
}
}
2 changes: 1 addition & 1 deletion src/core/jit/transform/check_dedupe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ impl<A> Transform for CheckDedupe<A> {

plan.is_dedupe = dedupe;

Valid::succeed(plan)
Valid::ok(plan)
}
}
2 changes: 1 addition & 1 deletion src/core/jit/transform/check_protected.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ impl<A> Transform for CheckProtected<A> {
None => true,
});

Valid::succeed(plan)
Valid::ok(plan)
}
}
2 changes: 1 addition & 1 deletion src/core/jit/transform/skip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ where
let variables: &Variables<Var> = self.variables;
skip(&mut plan.selection, variables);

Valid::succeed(plan)
Valid::ok(plan)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/variance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ pub trait Covariant: Sized {
/// of the type.
impl<A: Primitive + Sized> Invariant for A {
fn unify(self, other: Self) -> Valid<Self, String> {
Valid::succeed(self.merge_right(other))
Valid::ok(self.merge_right(other))
}
}

0 comments on commit 4f8a79b

Please sign in to comment.