Skip to content

Commit 23debd2

Browse files
authored
Parameters need to be serde (#39)
* parameters need to be serde * bump ver
1 parent 5a40fdf commit 23debd2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "safety-net"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
edition = "2024"
55
license = "MIT OR Apache-2.0"
66

src/attribute.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub type AttributeKey = String;
1818
pub type AttributeValue = Option<String>;
1919

2020
#[derive(Debug, Clone, PartialEq, Eq)]
21+
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2122
/// An attribute can add information to instances and wires in string form, like 'dont_touch'
2223
pub struct Attribute {
2324
k: AttributeKey,
@@ -59,6 +60,7 @@ impl std::fmt::Display for Attribute {
5960
}
6061

6162
#[derive(Debug, Clone)]
63+
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6264
/// A dedicated type to parameters for instantiables
6365
pub enum Parameter {
6466
/// An unsigned integer parameter

0 commit comments

Comments
 (0)