thomasarmel / socket-server-mocker

Mock socket server in Rust, for testing various network clients.
https://crates.io/crates/socket-server-mocker
MIT License
0 stars 2 forks source link

Remove unneeded `ServerMockerInstructionsList` #9

Closed nyurik closed 1 week ago

nyurik commented 1 week ago

This is a follow up to #8 and includes it. When reviewing, make sure to click "commits" tab and only look at the 2nd commit .

The ServerMockerInstructionsList is essentially a vec wrapper, and does not add any value other than adds to API size. Instead, it is much easier to just pass the Vec<Instruction> to the mock server.

Also, minor improvement to test_dns_mock to keep it smaller.

In general, I think it might make sense to start using b"..." byte strings - easier than encoding each hex separately.

thomasarmel commented 1 week ago

Wow thanks! @nyurik so you can close the PR https://github.com/thomasarmel/socket-server-mocker/pull/8 ?

thomasarmel commented 1 week ago

Ok I bumped the new version.

Btw now Clippy forbids missing doc:

#![forbid(unsafe_code, unused_must_use)]
#![forbid(
    missing_docs,
    unreachable_pub,
    unused_import_braces,
    unused_extern_crates
)]
nyurik commented 1 week ago

thx! I was thinking you may want to review #8 first, merge it, and then this pr could have been rebaed on top of it to actually see the difference with it. This way it might have been simpler to review, but either way works :)

About lints - I agree, need docs, and also need to enable CI to fail if clippy fails - i will propose CI changes soonish to ensure that.