[rustfmt] Formatting tweaks
@@ -50,12 +50,10 @@ pub struct EventConnectionInfo {
// prototyping, though.
impl Default for EventConnectionInfo {
fn default() -> Self {
- EventConnectionInfo {
- name: String::from("habitat"),
+ EventConnectionInfo { name: String::from("habitat"),
verbose: true,
cluster_uri: String::from("127.0.0.1:4223"),
- cluster_id: String::from("test-cluster"),
- }
+ cluster_id: String::from("test-cluster"), }
}
}
@@ -68,15 +66,12 @@ pub(super) fn init_stream(conn_info: EventConnectionInfo) -> Result<EventStream>
// it in the Supervisor's Tokio runtime, but there's currently a
// bug: https://github.com/YellowInnovation/nitox/issues/24
- thread::Builder::new()
- .name("events".to_string())
+ thread::Builder::new().name("events".to_string())
.spawn(move || {
- let EventConnectionInfo {
- name,
+ let EventConnectionInfo { name,
verbose,
cluster_uri,
- cluster_id,
- } = conn_info;
+ cluster_id, } = conn_info;
let cc = ConnectCommand::builder()
// .user(Some("nats".to_string()))
@@ -85,8 +80,8 @@ pub(super) fn init_stream(conn_info: EventConnectionInfo) -> Result<EventStream>
.verbose(verbose)
.build()
.unwrap();
- let opts = NatsClientOptions::builder()
- .connect_command(cc)
+ let opts =
+ NatsClientOptions::builder().connect_command(cc)
.cluster_uri(cluster_uri.as_str())
.build()
.unwrap();
@@ -112,8 +107,7 @@ pub(super) fn init_stream(conn_info: EventConnectionInfo) -> Result<EventStream>
})
});
- ThreadRuntime::new()
- .expect("Couldn't create event stream runtime!")
+ ThreadRuntime::new().expect("Couldn't create event stream runtime!")
.spawn(publisher)
.run()
.expect("something seriously wrong has occurred");
