fasterthanlime / feedback

An issue tracker for articles/series/videos at https://fasterthanli.me/
13 stars 0 forks source link

Understanding Rust futures by going way too deep #270

Closed kbridge closed 7 months ago

kbridge commented 1 year ago

I found something wrong on this page:

https://fasterthanli.me/articles/understanding-rust-futures-by-going-way-too-deep#position=10.1

Here's what it is:

pub const URL_1: &str = "https://fasterthanli.me/articles/whats-in-the-box";
pub const URL_2: &str = "https://fasterthanli.me/series/advent-of-code-2020/part-13";

I don't get why pub is necessary here except to suppress the "constant is never used" warning. Maybe some clarification is needed.

fasterthanlime commented 1 year ago

That’s probably right — I don’t consider “unnecessary use of pub” necessarily a bug in exploratory code like this (or even in applications in general).

if we were writing a library and we wanted to uphold compatibility guarantees then I’d certainly be more worried about it + recommend using cargo-semver

my instinct is that there’s at least another hundred of these throughout my current body of works, but.. don’t close that issue yet, we’ll surely get that one fixed!

fasterthanlime commented 7 months ago

I ended up fixing this anyway x) Thanks!