Skip to content
#

rust-library

Here are 796 public repositories matching this topic...

arlyon
arlyon commented Apr 17, 2020

Describe the bug

It is a common convention in rust code to prefix variables with an underscore if unused. When creating a graphql_object, I would like to prototype the interface and keep the compiler happy, so I prefix all the vars with an underscore.

struct Query;
#[juniper::graphql_object]
impl Query {
    fn blah() -> bool {
        true
    }
    fn fizz(_buzz: Strin
Ten0
Ten0 commented Jan 7, 2020

When rendering with an invalid template that refers to an Object instead of strings/integers/bools/arrays, the rendering silent fails by rendering "[object]", due to:
https://github.com/Keats/tera/blob/b91a985951fccf6896c7192ea7c78ba64608bb62/src/context.rs#L119
(by the way, this could be Cow::Borrowed)

This is does not match the rust philosophy of being explicit and quickly failing so

firestack
firestack commented Apr 6, 2020

Hello,
I was working on a crate and found inconsistent newlines when argh prints help for a binary when using different forms of doc comments.

When fields within a FromArgs struct are documented using /// style doc comments, and consecutive lines also begin with /// every newline and break in the doc comment is ignored when the --help string is printed. If instead the fields are docume

Shnatsel
Shnatsel commented Mar 15, 2020

drain() method is quite slow, both on SmallVec and TinyVec. I don't know why exactly, but I suspect branching on every access is to blame.

For Copy+!Drop You can achieve a very similar result faster if you obtain a slice into TinyVec (i.e. branch once) and iterate over it, then call truncate() once you're done. unicode-normalization crate does this:
https://github.com/unicode-rs/unico

Improve this page

Add a description, image, and links to the rust-library topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the rust-library topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.