
Can someone report? This should not compile
I knew I should have just learned C

I knew I should have just learned C
Trying to start a thread on the little novice habits we all picked up early in Rust and what the cleaner version looks like once it clicks. Not talking about huge architecture stuff, just the small everyday patterns that quietly get better as you go.
I'll throw out a couple to get it going:
1. Cloning to dodge the borrow checker → just borrow
Reaching for .clone() the second the borrow checker complains:
fn process(data: Vec<u8>) -> usize {
data.len()
}
let data = vec![1, 2, 3];
let len = process(data.clone()); // clone so we can still use data after
println!("still have {} bytes", data.len());
Take a slice instead and the clone disappears:
fn process(data: &[u8]) -> usize {
data.len()
}
let data = vec![1, 2, 3];
let len = process(&data);
println!("still have {} bytes", data.len());
2. Rigid param types → flexible impl Into<String>
Taking String forces the caller to allocate up front, and taking &str just pushes the .to_string() inside so you allocate even when they already handed you an owned String:
struct User {
name: String,
}
impl User {
fn new(name: String) -> Self {
User { name }
}
}
User::new("scadoshi".to_string()); // caller has to build the String themselves
impl Into<String> lets them pass whichever they've got, and only allocates when it actually has to:
impl User {
fn new(name: impl Into<String>) -> Self {
User { name: name.into() }
}
}
User::new("scadoshi"); // &str works
User::new(String::from("scadoshi")); // owned String moves straight in, no extra copy
What are yours?
Interested in taking a read on whether my projects cover what you'd expect from someone going deep on systems/backend Rust, or if there's an obvious gap.
- Zwipe: full-stack mobile MTG deck builder. One Dioxus codebase for iOS + Android, Axum + Postgres, 110k+ cards, 416 tests, zero unwrap in prod. Live at zwipe.net.
- Diprotodon: Redis-compatible server with hand-rolled RESP parsing.
- Nighthawk: hand-written LSM-tree KV store. WAL, SSTables, bloom filters, compaction.
- Migration tools: production CLIs, multi-week manual migrations down to one command. Retry logic, file-locked caches, cross-platform release binaries.
- Everything else is on a portfolio site built in Rust: https://scottyfermo.com
On AI, since it always comes up: I always understand the architecture and strategy before I have it build anything, otherwise I'm not really gaining from it. A lot of my research is AI-driven too, bouncing between AI, articles, and googling, which usually ends up being a few threads then Google's AI summary haha. Once I've got something in mind I'll have an AI plan it out, I critique the plan, then have it build. For the side quests where learning is the point, I write everything by hand until it turns menial, then describe the repetition to an AI in detail. Dipro and Nighthawk are mine where it counts.
Does this read coherent or scattered? And what's the one project you'd want to see that isn't there yet? Honesty is welcome
Been heads-down ~11 months on Zwipe, a mobile MTG deck builder where you build by swiping: right to add, left to skip, up to stash on the maybeboard. Pushed 1.1.0 today and figured I'd share what's new:
> Zwipe-select — swipe through legal commanders / partners / backgrounds / signature spells to fill your command zone instead of hunting for them in search
> Deck tags — label your decks by archetype (Aggro, Tokens, Reanimator… ~65 to pick from) with a quick searchable picker
> Keyword helper — tap any keyword on a card for a plain-language reminder of what it does. handy if you're newer or just blanking on Ward vs Hexproof again
> Expanded card view — tap a card in your deck for its full rules text (rendered with real mana symbols), cost, P/T or loyalty, and rarity
Still totally free. No ads, no subscriptions. iOS is live, Android's in beta.
zwipe.net if you want to check it out. happy to answer anything in the comments.
namespace CSharpAoc.Common;
public abstract record Result
{
public sealed record Ok(TValue Value) : Result;
public sealed record Err(TError Error) : Result;
public TValue Unwrap()
{
return this switch
{
Ok ok => ok.Value,
Err err => throw new InvalidOperationException(
$"Cannot Unwrap an Err. TError: {err.Error}"
),
_ => throw new InvalidOperationException("Unknown Result state"),
};
}
public TError UnwrapErr()
{
return this switch
{
Ok ok => throw new InvalidOperationException(
$"Cannot UnwrapErr an Ok. TValue: {ok.Value}"
),
Err err => err.Error,
_ => throw new InvalidOperationException("Unknown Result state"),
};
}
public bool IsOk() => this is Ok;
public bool IsErr() => this is Err;
public Result AndThen(Func> func)
{
return this switch
{
Ok ok => func(ok.Value),
Err err => new Result.Err(err.Error),
_ => throw new InvalidOperationException("Unknown Result state"),
};
}
public Result Map(Func func)
{
return this switch
{
Ok ok => new Result.Ok(func(ok.Value)),
Err err => new Result.Err(err.Error),
_ => throw new InvalidOperationException("Unknown Result state"),
};
}
}
Hi all, I need to clear Google's 12-tester / 14-day closed-testing requirement before I can launch on Android. Looking for testers, and happy to test yours back. Drop your link in the comments and I'll join today.
The app is Zwipe, a deck builder for trading-card games. It's already on iOS, so it's a real, working app, not a blank shell. Free, no ads, no in-app purchases.
How to join the test (takes about a minute):
Google requires testers to stay opted in for 14 days, so please keep the app installed for two weeks. It genuinely helps get Zwipe to launch.
Feedback is very welcome - bugs, confusing bits, anything. Just reply here or DM me.
Hi all, I need to clear Google's 12-tester / 14-day closed-testing requirement before I can launch on Android. Looking for testers, and happy to test yours back. Drop your link in the comments and I'll join today.
The app is Zwipe, a deck builder for trading-card games. It's already on iOS, so it's a real, working app, not a blank shell. Free, no ads, no in-app purchases.
How to join the test (takes about a minute):
Google requires testers to stay opted in for 14 days, so please keep the app installed for two weeks. It genuinely helps get Zwipe to launch.
Feedback is very welcome - bugs, confusing bits, anything. Just reply here or DM me.
Hi all, I need to clear Google's 12-tester / 14-day closed-testing requirement before I can launch on Android. Looking for testers, and happy to test yours back. Drop your link in the comments and I'll join today.
The app is Zwipe, a deck builder for trading-card games. It's already on iOS, so it's a real, working app, not a blank shell. Free, no ads, no in-app purchases.
How to join the test (takes about a minute):
Google requires testers to stay opted in for 14 days, so please keep the app installed for two weeks. It genuinely helps get Zwipe to launch.
Feedback is very welcome - bugs, confusing bits, anything. Just reply here or DM me.
Seems like most deck builders are built for desktop and mobile gets treated as an afterthought. Zwipe is mobile-first.
You pick a commander, the app filters to color identity and format legality, you pick what you want and then you swipe.
- Right adds the card
- Left skips
- Down undoes the last action
- Up sends it to the maybeboard (where applicable)
When you want to narrow further, the filter sheet has the dimensions you'd actually reach for.
110k+ cards from Scryfall, refreshed nightly (English-only for now). Format legality is real-time. Double-faced cards flip the way you'd expect. The printing carousel lets you swap in whatever version of the card fits the deck.
It's free on the App Store right now. Android is next. This is a solo build from a new developer, so if you have feature requests or bug reports, I'm welcoming both on my Discord.
If you brew on the couch more than at a desk, please give it a shot 😄