Commit Diff


commit - 3ef8fec0d3e020a8237a883745f82891e4e4bcb8
commit + ecefe0f2d76e9d8acaf99fa0a463bf38d0b0c167
blob - 6bd4e49e4e2d2bc6e01c39b781b5bcb5ae56764c
blob + 2f22f72c30139e3e229bc75455029cc276027ef7
--- src/metrics.rs
+++ src/metrics.rs
@@ -4,6 +4,8 @@ use std::{
     iter::FusedIterator,
 };
 
+use crate::s6::{ServiceDir, Status};
+
 pub fn escape(string: &str) -> Cow<str> {
     let escapes = string
         .chars()
@@ -25,8 +27,6 @@ pub fn escape(string: &str) -> Cow<str> {
     }
 }
 
-use crate::s6::{ServiceDir, Status};
-
 pub struct Writer<'w, W: Write, I: Iterator<Item = ServiceDir>> {
     writer: &'w mut W,
     iter: I,
@@ -72,7 +72,7 @@ impl<'w, W: Write, I: Iterator<Item = ServiceDir>> Ite
                             "# HELP s6_service_signum Signal number of the service.\n",
                         )
                         .as_bytes(),
-                    )?;
+                    )?
                 }
                 match status {
                     Status::Unsupervised => writeln!(
@@ -105,7 +105,7 @@ impl<'w, W: Write, I: Iterator<Item = ServiceDir>> Ite
                                 concat!("s6_service_exitcode{{service=\"{}\",s6_service_exitcode=\"{}\"}} 1"),
                                 service,
                                 exitcode
-                            )?;
+                            )?
                         }
                         if let Some(signum) = supervised_status.signum {
                             writeln!(
@@ -113,8 +113,8 @@ impl<'w, W: Write, I: Iterator<Item = ServiceDir>> Ite
                                 concat!("s6_service_signum{{service=\"{}\",s6_service_signum=\"{}\"}} 1"),
                                 service,
                                 signum
-                            )?;
-                        };
+                            )?
+                        }
                         Ok(())
                     }
                 }