Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/benchmark_repro.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "deserialize")]
use facet::Facet;
use std::collections::HashMap;

Expand Down
1 change: 1 addition & 0 deletions tests/option_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "deserialize")]
use facet::Facet;

#[derive(Debug, PartialEq, Clone, Facet)]
Expand Down
5 changes: 5 additions & 0 deletions tests/vec_array_of_tables.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "deserialize")]
//! Tests for Vec serialization and deserialization using TOML array of tables syntax.
//!
//! TOML has two ways to represent arrays:
Expand All @@ -8,9 +9,11 @@

use facet::Facet;

#[cfg(feature = "serialize")]
#[derive(Debug, PartialEq, Facet)]
struct NestedUnit;

#[cfg(feature = "serialize")]
#[derive(Debug, PartialEq, Facet)]
struct Root {
value: i32,
Expand All @@ -28,6 +31,7 @@ struct RootWithNested {
nested: Vec<Nested>,
}

#[cfg(feature = "serialize")]
#[test]
#[should_panic(expected = "Expected field with name 'unit'")]
fn test_nested_unit_struct_vec() {
Expand All @@ -46,6 +50,7 @@ fn test_nested_unit_struct_vec() {
let _deserialized: Root = facet_toml::from_str(&serialized).unwrap();
}

#[cfg(feature = "serialize")]
#[test]
fn test_nested_struct_multiple_fields_vec() {
let root = RootWithNested {
Expand Down