cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
20.64k stars 1.12k forks source link

fix: typo quick start doc snippet #46

Closed kristianpaul closed 5 months ago

kristianpaul commented 5 months ago

Solves #45

eaufavor commented 5 months ago

We changed it a slightly different way.

kristianpaul commented 5 months ago

@eaufavor There are no changes (https://github.com/cloudflare/pingora/commit/8160ad169878ea6b4884b977f2a96541083036c4) fixing that snippet of code,

can you elaborate how you changed it? the changes are not reflected and the quick-start still broken which i personally think is bad, even ifs its a small typo... copy and paste code should always run, its bad experience for starters when it doesnt

paul@rock0:~/load_balancer $ cargo run
   Compiling load_balancer v0.1.0 (/mnt/home/pi/load_balancer)
error: invalid format string: expected `'}'`, found `'?'`
  --> src/main.rs:36:47
   |
36 |         println!("upstream peer is: {:upstream?}");
   |                                     -         ^ expected `'}'` in format string
   |                                     |
   |                                     because of this opening brace
   |
   = note: if you intended to print `{`, you can escape it using `{{`

error: could not compile `load_balancer` (bin "load_balancer") due to 1 previous error
paul@rock0:~/load_balancer $ date
Mon Mar  4 03:49:51 PM UTC 2024
eaufavor commented 5 months ago

Oh you are right. I just noticed that I accidentally dropped that commit when pushing the change. We will fix it soon. Thanks!

kristianpaul commented 5 months ago

Oh you are right. I just noticed that I accidentally dropped that commit when pushing the change. We will fix it soon. Thanks!

I would have just merged the PR so what was the point of it anyway?, it was an easy fix... but thanks for noticing my comments hope you can keep improving the docs..

andrewhavck commented 5 months ago

Thanks, the commit referenced here is now synced, closing this.