Skip to content

Commit 1a4e245

Browse files
authored
[Cleanup] Remove Value to AnyValue conversion methods (#2127)
1 parent 8e21c75 commit 1a4e245

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

opentelemetry/src/logs/record.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{Array, Key, StringValue, Value};
1+
use crate::{Key, StringValue};
22
use std::{borrow::Cow, collections::HashMap, time::SystemTime};
33

44
/// SDK implemented trait for managing log records
@@ -108,23 +108,6 @@ impl<K: Into<Key>, V: Into<AnyValue>> FromIterator<(K, V)> for AnyValue {
108108
}
109109
}
110110

111-
impl From<Value> for AnyValue {
112-
fn from(value: Value) -> Self {
113-
match value {
114-
Value::Bool(b) => b.into(),
115-
Value::I64(i) => i.into(),
116-
Value::F64(f) => f.into(),
117-
Value::String(s) => s.into(),
118-
Value::Array(a) => match a {
119-
Array::Bool(b) => AnyValue::from_iter(b),
120-
Array::F64(f) => AnyValue::from_iter(f),
121-
Array::I64(i) => AnyValue::from_iter(i),
122-
Array::String(s) => AnyValue::from_iter(s),
123-
},
124-
}
125-
}
126-
}
127-
128111
/// A normalized severity value.
129112
#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd)]
130113
pub enum Severity {

0 commit comments

Comments
 (0)