this post was submitted on 03 Aug 2023
10 points (100.0% liked)

Rust Programming

8172 readers
20 users here now

founded 5 years ago
MODERATORS
 

I haven't had this much trouble since Ada coding in 1986 when I was age 16.

Can someone please help me get the procedural syntax right?

https://github.com/LemmyNet/lemmy/pull/3805

you are viewing a single comment's thread
view the rest of the comments
[–] nous@programming.dev 5 points 1 year ago* (last edited 1 year ago) (1 children)

Looks to be failing a cargo fmt check: https://woodpecker.join-lemmy.org/repos/129/pipeline/1821/8

+ cargo +nightly-2023-07-10 fmt -- --check
Diff in /woodpecker/src/github.com/LemmyNet/lemmy/crates/utils/src/rate_limit/mod.rs at line 224:
 use std::sync::atomic::{AtomicUsize, Ordering};
 static CONCURRENT_API_USE: AtomicUsize = AtomicUsize::new(0);
 
-
 impl<s> Service for RateLimitedMiddleware<s>
 where
   S: Service + 'static,

If I read that right you have one extra blank new line that the nightly rust fmt is not happy about.

You should just need to run cargo fmt on the code, might need the same nightly version as above though.

[–] RoundSparrow@lemmy.ml 2 points 1 year ago (1 children)
[–] nous@programming.dev 5 points 1 year ago (1 children)

Looks like it is now failing on the SQL fmt checks - which you have not changed and so are likely a problem in master. Seems https://github.com/LemmyNet/lemmy/pull/3800 fixes that issue and you are likely going to need to wait for that to be merged first. Or otherwise talk to the maintainers about it since it is broken in master and there is aPR to fix the issue.

[–] RoundSparrow@lemmy.ml 3 points 1 year ago