Skip to content

Commit d1d5110

Browse files
committed
chore: remove duplicated validation
Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
1 parent 7282376 commit d1d5110

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/servers/src/prom_row_builder.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ impl TableBuilder {
166166
row[*e].value_data = tag_value;
167167
continue;
168168
}
169-
let tag_name = prom_validation_mode.decode_label_name(raw_tag_name)?;
169+
170+
// Safety: we've validated the label name is valid in line 152.
171+
let tag_name = unsafe { std::str::from_utf8_unchecked(raw_tag_name) };
170172
self.schema.push(ColumnSchema {
171173
column_name: tag_name.to_owned(),
172174
datatype: ColumnDataType::String as i32,

0 commit comments

Comments
 (0)