Skip to content

Commit

Permalink
Fix ui tests in nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
GREsau committed Aug 30, 2024
1 parent dffa33f commit d6c8b6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"rust-analyzer.check.command": "clippy",
"rust-analyzer.cargo.features": "all"
"rust-analyzer.cargo.features": "all",
"rust-analyzer.testExplorer": true
}
2 changes: 1 addition & 1 deletion schemars/tests/ui/repr_non_unit_variant.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: JsonSchema_repr: must be a unit variant
--> $DIR/repr_non_unit_variant.rs:7:5
|
7 | EmptyTuple(),
| ^^^^^^^^^^
| ^^^^^^^^^^^^
4 changes: 2 additions & 2 deletions schemars_derive/src/schema_exprs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ pub fn expr_for_repr(cont: &Container) -> Result<SchemaExpr, syn::Error> {

if let Some(non_unit_error) = variants.iter().find_map(|v| match v.style {
Style::Unit => None,
_ => Some(syn::Error::new(
v.original.span(),
_ => Some(syn::Error::new_spanned(
v.original,
"JsonSchema_repr: must be a unit variant",
)),
}) {
Expand Down

0 comments on commit d6c8b6b

Please sign in to comment.