DataDog / glommio

Glommio is a thread-per-core crate that makes writing highly parallel asynchronous applications in a thread-per-core architecture easier for rustaceans.
Other
3.06k stars 162 forks source link

Doc cleanup #660

Closed vlovich closed 5 months ago

vlovich commented 5 months ago

What does this PR do?

Cleanups the wording in timer docs to clarify something I found ambiguous + some warnings I saw running cargo doc.

Motivation

Was confused about some wording when reading timer docs.

Related issues

654

Additional Notes

Checklist

[] I have added unit tests to the code I am submitting [] My unit tests cover both failure and success scenarios [] If applicable, I have discussed my architecture

glommer commented 5 months ago

@vlovich there's a clippy warning here. Note that by default clippy only runs on the code, but we ask it to build everything, including code examples

vlovich commented 5 months ago

Hmm.... very strange. cargo clippy --all-targets -- -D warnings isn't finding the issue for me locally. Same for cargo test:

cargo test check_clippy
   Compiling glommio v0.9.0 (/home/vlovich/projects/byte-harbor/glommio/glommio)
    Finished test [unoptimized + debuginfo] target(s) in 2.88s
     Running unittests src/lib.rs (target/debug/deps/glommio-7acb0688715cdf5d)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 389 filtered out; finished in 0.00s

     Running tests/linters.rs (target/debug/deps/linters-9fd160ff283ac980)

running 1 test
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
test tests::check_clippy ... ok

If I run nightly, then I get all sorts of clippy warnings but nothing about this malformed example.

vlovich commented 5 months ago

Ah - cargo test --doc is needed to be run.