We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68240b4 commit ef2cd70Copy full SHA for ef2cd70
examples/example-produce.rs
@@ -32,13 +32,13 @@ fn produce_message<'a, 'b>(
32
// ~ create a producer. this is a relatively costly operation, so
33
// you'll do this typically once in your application and re-use
34
// the instance many times.
35
- let mut producer = try!(Producer::from_hosts(brokers)
+ let mut producer = Producer::from_hosts(brokers)
36
// ~ give the brokers one second time to ack the message
37
.with_ack_timeout(Duration::from_secs(1))
38
// ~ require only one broker to ack the message
39
.with_required_acks(RequiredAcks::One)
40
// ~ build the producer with the above settings
41
- .create());
+ .create()?;
42
43
// ~ now send a single message. this is a synchronous/blocking
44
// operation.
0 commit comments