Skip to content

Commit ef2cd70

Browse files
committed
stray try
1 parent 68240b4 commit ef2cd70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/example-produce.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ fn produce_message<'a, 'b>(
3232
// ~ create a producer. this is a relatively costly operation, so
3333
// you'll do this typically once in your application and re-use
3434
// the instance many times.
35-
let mut producer = try!(Producer::from_hosts(brokers)
35+
let mut producer = Producer::from_hosts(brokers)
3636
// ~ give the brokers one second time to ack the message
3737
.with_ack_timeout(Duration::from_secs(1))
3838
// ~ require only one broker to ack the message
3939
.with_required_acks(RequiredAcks::One)
4040
// ~ build the producer with the above settings
41-
.create());
41+
.create()?;
4242

4343
// ~ now send a single message. this is a synchronous/blocking
4444
// operation.

0 commit comments

Comments
 (0)