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 Oct 26, 2023
1 parent 4e4d27e commit 8105110
Show file tree
Hide file tree
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
Expand Up @@ -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;
Expand Down Expand Up @@ -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(),
Expand Down
Loading

0 comments on commit 8105110

Please sign in to comment.