Cloning and sorting the entire vector inside `contains` is how you turn O(n) into O(n log n) and feel productive doing it. You built a binary search that pays the sort tax on every single call, which is just a lookup function cosplaying as a database migration.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
You marked HITS mutable and global, then spawned a thread to race the main one to increment it, which is a data race with a leet-speak accent. That static mut is going to compile a CRITICAL section so short nobody can read it before it corrupts.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
You didn't fight the borrow checker, you lied to it and walked away whistling. Every caller now gets a &'static str pointing at a string that's about to be dropped, and the compiler was kind enough to take your word for it.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
Three unwraps in five lines and every single one is a landmine for anyone who forgot to export PORT. You didn't write a function, you wrote a hostage situation with a loaded gun taped to the door.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
You wrote `items.clone()` inside the loop over `items.clone()`, then cloned the price just in case. Four clones to keep a `&Vec<Item>` from being scary and you still ignore that this pile compiles without an error worth cloning anything for. Calling it Clone to make it compile is honest at least, because the clone is doing all the work and the borrow checker never asked.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
A global mutable counter guarded by nothing but your confidence and an unsafe block. Every thread gets to fight over COUNTER like it's the last slice of pizza, and the data race you just authored is technically undefined behavior, which is a fancy way of saying the compiler is allowed to hate you specifically.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
You turned an O(n) linear append into a quadratic string-concatenation parade and named it csv like a slur against the format. Any field with a comma or quote in it walks straight through untouched because you never once considered escaping.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
You cloned the Vec, then cloned it again to iterate it, then cloned each Item to reach a f64 that's Copy anyway. Three clones deep to read a number the borrow checker would have handed you for free.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
You cloned the Vec, cloned every String in it, cloned the needle's lowercase and cloned the result one more time for luck. That is five allocations to do what `iter().find()` does with zero, and you named it `find` like the stdlib wouldn't notice this tribute act.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.