TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24292 19
This Rust code was the one responsible for taking the whole damn world offline.

/// Fetch edge features based on `input` struct into [`Features`] buffer.
pub fn fetch_features(
&mut self,
input: &dyn BotsInput,
features: &mut Features,
) -> Result<(), (ErrorFlags, i32)> {
// update features checksum (lower 32 bits) and copy edge feature names
features.checksum &= 0xFFFF_FFFF_0000_0000;
features.checksum |= u64::from(self.config.checksum);
let (feature_values, _) = features
.append_with_names(&self.config.feature_names)
.unwrap();
}



If this solution were still written in C++, what are the chances that this error would have happened?

Considering the code was rewritten, meaning there was already a working solution, was this forced migration from C++ to Rust really a good idea? After all, the world went down because of a human error, but maybe that mistake could have been avoided if the rewrite had never happened.



https://redd.it/1p1jurj
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
More from @r_cpp
  1. Oct 12, 2026cppreference-doc for Qt Creator Release cppreference C++ v2025.12.01 · cristianadam/cppref…
  2. Oct 12, 2026ACCU Overload Journal 195 - October 2026 https://accu.org/journals/overload/overload195 ht…
  3. Oct 12, 2026C++ Contracts C++ contracts are a good thing, why are people saying it's a bad thing? Anyb…
  4. Oct 11, 2026wxWidgets 3.2.12 and 3.3.4 Released https://wxwidgets.org/news/2026/10/wxwidgets-3.2.12-an…
  5. Oct 11, 2026VKRT NES Remaster — an open-source C++20 NES emulator with an observation-driven remasteri…
  6. Oct 11, 2026Right way to test async code https://redd.it/1x2wqgz @r_cpp
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →