We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf6e256 commit 2051f62Copy full SHA for 2051f62
1 file changed
src/value.rs
@@ -12,8 +12,9 @@ use crate::map::Map;
12
/// Standard operations on a [`Value`] by users of this crate do not require
13
/// knowledge of [`ValueKind`]. Introspection of underlying kind is only required
14
/// when the configuration values are unstructured or do not have known types.
15
-#[derive(Debug, Clone, PartialEq)]
+#[derive(Debug, Clone, PartialEq, Default)]
16
pub enum ValueKind {
17
+ #[default]
18
Nil,
19
Boolean(bool),
20
I64(i64),
@@ -29,12 +30,6 @@ pub enum ValueKind {
29
30
pub(crate) type Array = Vec<Value>;
31
pub(crate) type Table = Map<String, Value>;
32
-impl Default for ValueKind {
33
- fn default() -> Self {
34
- Self::Nil
35
- }
36
-}
37
-
38
impl<T> From<Option<T>> for ValueKind
39
where
40
T: Into<Self>,
0 commit comments