msrd0

Results 153 comments of msrd0

I can try to do a PR but I need some more details on how you think this should be addressed. It sounds like the problem is with the macro...

By looking briefly at your loop code, it looks like askama "forgets" that `self` is involved and therefore doesn't take a reference. The behaviour can be replicated like this: ```jinja2...

> in Rust, there is one and only one idiom for "this can take an owned or borrowed thing and you don't need to care which": method call syntax. This...

Sure. Just looking at the expansion of above code, I was able to reproduce the idea behind it ([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b4e57ea392cf1a5de44822b46c8a32c1)): ```rust fn strlen(s: &str) -> usize { s.len() } macro_rules! strlen...

I know, that function always took a `&char` because of this. Maybe it'd help if you allowed the reference operator to be used with literals, so that I can write...

> Just to be clear, the "you" you're referring to in this case is @djc. Sorry, my bad. > especially in relation to how all of it plays together with...

I think this is neither - I don't want above code anywhere in my template because my first impression would be _what is this?_ and then, after understanding the code,...

> and then parsed the HTML to modify the links to point to docs.rs I was thinking about several solutions on how to get more reliable doc links. Using rustdoc...

Do you want to work on this? I haven't looked into using rust-analyzer at all, it was just an idea I had once.