MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / remove_after_semicolon

Function remove_after_semicolon

cranelift/assembler-x64/src/fuzz.rs:247–255  ·  view source on GitHub ↗

Remove everything after the first semicolon in the disassembly and trim any trailing spaces. This is necessary to remove the implicit operands we end up printing for Cranelift's sake.

(dis: &str)

Source from the content-addressed store, hash-verified

245/// trailing spaces. This is necessary to remove the implicit operands we end up
246/// printing for Cranelift's sake.
247fn remove_after_semicolon(dis: &str) -> &str {
248 match dis.find(';') {
249 None => dis,
250 Some(idx) => {
251 let (prefix, _) = dis.split_at(idx);
252 prefix.trim()
253 }
254 }
255}
256
257#[test]
258fn remove_after_parenthesis_test() {

Callers 1

fix_upFunction · 0.85

Calls 1

findMethod · 0.45

Tested by

no test coverage detected