Skip to content

Commit 9fe144e

Browse files
committed
update example
1 parent 0e1595e commit 9fe144e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/proxy.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ impl PacketHandler for DemoHandler {
8686
if sql.contains("avocado") {
8787
// take over processing of this packet and return an error packet
8888
// to the client
89-
Action::Error(1064, // error code
90-
[0x31, 0x32, 0x33, 0x34, 0x35], // sql state
91-
String::from("Proxy rejecting any avocado-related queries"))
89+
Action::Error {
90+
code: 1064, // error code
91+
state: [0x31, 0x32, 0x33, 0x34, 0x35], // sql state
92+
msg: String::from("Proxy rejecting any avocado-related queries")
93+
}
9294
} else {
9395
// pass the packet to MySQL unmodified
9496
Action::Forward

0 commit comments

Comments
 (0)