From 016cb3f8a76da1d593921e70ca33be38789f8301 Mon Sep 17 00:00:00 2001 From: Cliff Dyer Date: Wed, 3 Jul 2024 13:50:39 -0400 Subject: [PATCH] Clean up examples and lint with no features --- Cargo.toml | 24 ++++++++++++++++++++++++ src/transcription.rs | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c136ada4..6b702b21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,3 +39,27 @@ crossbeam = "0.8" default = ["prerecorded", "live"] live = ["dep:tungstenite", "dep:tokio-tungstenite"] prerecorded = [] + +[[example]] +name = "prerecorded_from_file" +required-features = ["prerecorded"] + +[[example]] +name = "callback" +required-features = ["prerecorded"] + +[[example]] +name = "make_prerecorded_request_builder" +required-features = ["prerecorded"] + +[[example]] +name = "microphone_stream" +required-features = ["live"] + +[[example]] +name = "prerecorded_from_url" +required-features = ["prerecorded"] + +[[example]] +name = "simple_stream" +required-features = ["live"] diff --git a/src/transcription.rs b/src/transcription.rs index fe22ce55..847ec47d 100644 --- a/src/transcription.rs +++ b/src/transcription.rs @@ -19,7 +19,7 @@ pub mod prerecorded; /// /// [api]: https://developers.deepgram.com/api-reference/#transcription #[derive(Debug, Clone)] -pub struct Transcription<'a>(&'a Deepgram); +pub struct Transcription<'a>(#[allow(unused)] &'a Deepgram); impl Deepgram { /// Construct a new [`Transcription`] from a [`Deepgram`].