Skip to content

Commit

Permalink
oh, right: you have to actually remove the Result
Browse files Browse the repository at this point in the history
i nearly pulled a @bnaecker with this one!
  • Loading branch information
hawkw committed Aug 22, 2024
1 parent 64ae3a0 commit a62b2d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,7 @@ impl Server {
let all_servers_shutdown = FuturesUnordered::new();

let metrics =
metrics::Metrics::new(&log, &args, config.metrics, apictx.clone())
.map_err(|err| {
format!("failed to initialize metrics subsystem: {err}")
})?;
metrics::Metrics::new(&log, &args, config.metrics, apictx.clone());

for addr in args.addresses {
start_dropshot_server(
Expand Down
4 changes: 2 additions & 2 deletions gateway/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl Metrics {
args: &MgsArguments,
cfg: MetricsConfig,
apictx: Arc<ServerContext>,
) -> anyhow::Result<Self> {
) -> Self {
let &MgsArguments { id, rack_id, ref addresses } = args;
// Create a channel for the SP poller tasks to send samples to the
// Oximeter producer endpoint.
Expand Down Expand Up @@ -241,7 +241,7 @@ impl Metrics {
ServerManager { log, addrs: addrs_rx, registry }.run(cfg),
)
};
Ok(Self { addrs_tx, rack_id_tx, server })
Self { addrs_tx, rack_id_tx, server }
}

pub fn set_rack_id(&mut self, rack_id: Uuid) {
Expand Down

0 comments on commit a62b2d4

Please sign in to comment.