# macho:use mem.asBytes and meta.eql in commands.zig · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5cba16c707fd4c46aeeabebdcc85d06b9149d6e4)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5cba16c707fd4c46aeeabebdcc85d06b9149d6e4

Requested commit: 5cba16c707fd4c46aeeabebdcc85d06b9149d6e4

Commit: 5cba16c707fd4c46aeeabebdcc85d06b9149d6e4

Tree: 4791d3480860b89a15840219440b3f22d6a466cb

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
macho:use mem.asBytes and meta.eql in commands.zig

This commit addresses comments suggesting a cleaner approach
at converting an `extern` struct to its byte representation using
`mem.asBytes`, and to use `meta.eql` in place of more fragile
`mem.eql(u8, ...)` for comparison of two `extern` structs.

Thanks LemonBoy!

```

## Parents

- [0fba2f71758bd4230f5c6ff9a638e6b69a671a78](https://git.cafe/gitcafe/zig/commit/0fba2f71758bd4230f5c6ff9a638e6b69a671a78?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5cba16c707fd4c46aeeabebdcc85d06b9149d6e4?format=markdown)
