Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cloutiertyler committed Dec 9, 2023
1 parent f3ed8bf commit 0cd632b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion crates/cli/src/subcommands/generate/csharp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ pub fn autogen_csharp_table(ctx: &GenCtx, table: &TableDesc, namespace: &str) ->
.clone()
.into_schema(0.into())
.validated()
.expect("Failed to generate table due to validation errors")
.expect("Failed to generate table due to validation errors"),
),
namespace,
)
Expand Down
24 changes: 10 additions & 14 deletions crates/sats/src/db/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1406,27 +1406,23 @@ mod tests {
t_col.columns.push(ColumnDef::sys("", AlgebraicType::U64));
assert_eq!(
t_col.into_schema(TableId(0)).validated(),
Err(vec![
SchemaError::EmptyName {
table: "test".to_string(),
ty: DefType::Column,
id: 5
},
])
Err(vec![SchemaError::EmptyName {
table: "test".to_string(),
ty: DefType::Column,
id: 5
},])
);

let mut t_ct = t.clone();
t_ct.constraints
.push(ConstraintDef::new("".into(), Constraints::primary_key(), ColId(0)));
assert_eq!(
t_ct.into_schema(TableId(0)).validated(),
Err(vec![
SchemaError::EmptyName {
table: "test".to_string(),
ty: DefType::Constraint,
id: 0,
},
])
Err(vec![SchemaError::EmptyName {
table: "test".to_string(),
ty: DefType::Constraint,
id: 0,
},])
);

// TODO(Tyler): I am disabling this because it's actually not correct.
Expand Down

0 comments on commit 0cd632b

Please sign in to comment.