Skip to content

Commit

Permalink
flatten BuiltinType into AlgebraicType
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Nov 17, 2023
1 parent bcdffef commit 2869549
Showing 16 changed files with 530 additions and 964 deletions.
4 changes: 2 additions & 2 deletions crates/cli/src/subcommands/call.rs
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ use itertools::Either;
use serde_json::Value;
use spacetimedb::db::AlgebraicType;
use spacetimedb_lib::de::serde::deserialize_from;
use spacetimedb_lib::sats::{AlgebraicTypeRef, BuiltinType, Typespace};
use spacetimedb_lib::sats::{AlgebraicTypeRef, Typespace};
use spacetimedb_lib::{Address, ProductTypeElement};
use std::fmt::Write;
use std::iter;
@@ -86,7 +86,7 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), Error> {
.unwrap_or_default()
.zip(describe_reducer.schema.elements.iter())
.map(|(argument, element)| match &element.algebraic_type {
AlgebraicType::Builtin(BuiltinType::String) if !argument.starts_with('\"') || !argument.ends_with('\"') => {
AlgebraicType::String if !argument.starts_with('\"') || !argument.ends_with('\"') => {
format!("\"{}\"", argument)
}
_ => argument.to_string(),
Loading

0 comments on commit 2869549

Please sign in to comment.