Skip to content

Commit a24225e

Browse files
fix: replace ValidationError with DecodingError in custom section decoding
Signed-off-by: Florian Hartung <florian.hartung@dlr.de>
1 parent 66fd500 commit a24225e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/core/decoding/modules/custom_section.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
22
core::decoding::decoder::{span::Span, WasmDecoder},
3-
DecodingError, ValidationError,
3+
DecodingError,
44
};
55

66
#[derive(Debug, Clone)]
@@ -10,11 +10,10 @@ pub struct CustomSection<'wasm> {
1010
}
1111

1212
impl<'wasm> CustomSection<'wasm> {
13-
// TODO this should return a Result<_, DecodingError>
1413
pub(crate) fn decode(
1514
wasm: &mut WasmDecoder<'wasm>,
1615
section_contents: Span,
17-
) -> Result<CustomSection<'wasm>, ValidationError> {
16+
) -> Result<CustomSection<'wasm>, DecodingError> {
1817
// customsec ::= section_0(custom)
1918
// custom ::= name byte*
2019
// name ::= b*:vec(byte) => name (if utf8(name) = b*)

0 commit comments

Comments
 (0)