Skip to content

Commit

Permalink
+address reviews
Browse files Browse the repository at this point in the history
Signed-off-by: prognant <pierre.rognant@datadoghq.com>
  • Loading branch information
prognant committed Jun 22, 2021
1 parent 99c067d commit 8ccedb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 1 addition & 5 deletions docs/reference/remap/functions/encode_logfmt.cue
Expand Up @@ -5,11 +5,7 @@ remap: functions: encode_logfmt: {
description: #"""
Encodes the `value` to [logfmt](\#(urls.logfmt)).
"""#
notices: [
"""
""",
]
notices: functions.encode_key_value.notices

arguments: [
{
Expand Down
7 changes: 3 additions & 4 deletions lib/vrl/stdlib/src/encode_key_value.rs
Expand Up @@ -121,10 +121,9 @@ impl Expression for EncodeKeyValueFn {
}

fn type_def(&self, _state: &state::Compiler) -> TypeDef {
match &self.fields {
None => TypeDef::new().bytes().infallible(),
Some(_) => TypeDef::new().bytes().fallible(),
}
TypeDef::new()
.bytes()
.with_fallibility(self.fields.is_some())
}
}

Expand Down

0 comments on commit 8ccedb7

Please sign in to comment.