Skip to content

Commit e87a7be

Browse files
committed
Refactor comments in Go and Rust config.yml files to use consistent formatting for method return values and response instructions, enhancing readability.
1 parent d514048 commit e87a7be

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

solutions/go/02-rg2/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ hints:
44
This is returned by the [`Accept()`](https://pkg.go.dev/net#Listener.Accept) method.
55
66
```go
7-
# The return value value includes:
8-
# 1. the client's connection (a `net.Conn` object)
9-
# 2. an error (if any)
7+
// The return value value includes:
8+
// 1. the client's connection (a `net.Conn` object)
9+
// 2. an error (if any)
1010
conn, err := listener.Accept()
1111
```
1212
@@ -17,7 +17,7 @@ hints:
1717
Use the [`Write()`](https://pkg.go.dev/net#Conn.Write) method on the client's connection:
1818
1919
```go
20-
# Send the response to the client
20+
// Send the response to the client
2121
conn.Write([]byte("+PONG\r\n"))
2222
```
2323

solutions/rust/02-rg2/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
hints:
22
- title_markdown: "How do I access the client's TCP connection?"
33
body_markdown: |-
4-
This is returned by the [`incoming()`](https://doc.rust-lang.org/std/net/struct.TcpListener.html#method.into_incoming) method.
4+
This is returned by the [`incoming()`](https://doc.rust-lang.org/std/net/struct.TcpListener.html#method.incoming) method.
55
66
```rust
7-
# The return value is an iterator that provides a sequence of `TcpStream` objects.
7+
// The return value is an iterator that provides a sequence of `TcpStream` objects.
88
for stream in listener.incoming()
99
```
1010
@@ -15,7 +15,7 @@ hints:
1515
Use the [`write_all()`](https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all) method on the client's connection:
1616
1717
```rust
18-
# Send the response to the client
18+
// Send the response to the client
1919
stream.write_all(b"+PONG\r\n").unwrap();
2020
```
2121

0 commit comments

Comments
 (0)