add evocative examples for Shl and Shr#35863
Conversation
|
IMO this is a nice but unnecessarily sophisticated example, since the implementation involves some distractingly nontrivial vector manipulation. For documentation purposes is it not enough to just have say a |
|
@aravind-pg Yeah, that's a good point. I've added the examples you suggested. Do you think something like |
|
Sure, I personally quite like it, but I'm not sure what the policy is on having two separate examples in the documentation (I would think it leans towards a no, in the interest of brevity). |
|
In general, more examples are good; brevity isn't always a good thing when it comes to docs. There's obviously some kind of limit to this. On Aug 21, 2016, 00:26 -0400, Aravind Gollakota notifications@github.com, wrote:
|
|
Working on this PR started to feel like this after a while: |
r? @steveklabnik add examples that lift `<<` and `>>` to a trivial struct replace `Scalar` structs with struct tuples add `fn main` wrappers to enable Rust Playground "Run" button
6034fd5 to
ff3a761
Compare
|
Looks great, thanks! @bors: r+ rollup |
|
📌 Commit ff3a761 has been approved by |
…klabnik add evocative examples for `Shl` and `Shr` r? @steveklabnik
…klabnik add evocative examples for `Shl` and `Shr` r? @steveklabnik
…klabnik add evocative examples for `Shl` and `Shr` r? @steveklabnik
…klabnik add evocative examples for `Shl` and `Shr` r? @steveklabnik
|
⌛ Testing commit ff3a761 with merge a06c27e... |
|
💔 Test failed - auto-mac-64-opt-rustbuild |
|
@bors retry |
…klabnik add evocative examples for `Shl` and `Shr` r? @steveklabnik
…klabnik add evocative examples for `Shl` and `Shr` r? @steveklabnik
…klabnik add evocative examples for `Shl` and `Shr` r? @steveklabnik
r? @steveklabnik