From 140d3345473ea6ebc98c7958c0312ede3099fab3 Mon Sep 17 00:00:00 2001 From: Kikuo Emoto Date: Mon, 25 Mar 2024 10:39:12 +0900 Subject: [PATCH] style(xray-lite): fix clippy error Removes unnecessary `main` function from a doctest. --- xray-lite/src/client.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/xray-lite/src/client.rs b/xray-lite/src/client.rs index 5eea3f7..b642192 100644 --- a/xray-lite/src/client.rs +++ b/xray-lite/src/client.rs @@ -118,12 +118,10 @@ where /// SubsegmentContext, /// }; /// -/// fn main() { -/// let client = DaemonClient::from_lambda_env().into_infallible(); -/// # std::env::set_var("_X_AMZN_TRACE_ID", "Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1"); -/// let context = SubsegmentContext::from_lambda_env(client).unwrap(); -/// let _session = context.enter_subsegment(CustomNamespace::new("readme.example")); -/// } +/// let client = DaemonClient::from_lambda_env().into_infallible(); +/// # std::env::set_var("_X_AMZN_TRACE_ID", "Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1"); +/// let context = SubsegmentContext::from_lambda_env(client).unwrap(); +/// let _session = context.enter_subsegment(CustomNamespace::new("readme.example")); /// ``` pub trait IntoInfallibleClient { /// Client type.