summaryrefslogtreecommitdiffstats
path: root/third_party/rust/wasm-smith/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/wasm-smith/src/lib.rs')
-rw-r--r--third_party/rust/wasm-smith/src/lib.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/third_party/rust/wasm-smith/src/lib.rs b/third_party/rust/wasm-smith/src/lib.rs
index 8d17290473..b985791aae 100644
--- a/third_party/rust/wasm-smith/src/lib.rs
+++ b/third_party/rust/wasm-smith/src/lib.rs
@@ -58,7 +58,7 @@ mod component;
mod config;
mod core;
-pub use crate::core::{InstructionKind, InstructionKinds, MaybeInvalidModule, Module};
+pub use crate::core::{InstructionKind, InstructionKinds, Module};
use arbitrary::{Result, Unstructured};
pub use component::Component;
pub use config::{Config, MemoryOffsetChoices};
@@ -108,10 +108,7 @@ pub(crate) fn limited_str<'a>(max_size: usize, u: &mut Unstructured<'a>) -> Resu
Err(e) => {
let i = e.valid_up_to();
let valid = u.bytes(i).unwrap();
- let s = unsafe {
- debug_assert!(str::from_utf8(valid).is_ok());
- str::from_utf8_unchecked(valid)
- };
+ let s = str::from_utf8(valid).unwrap();
Ok(s)
}
}