Skip to content

Commit

Permalink
Elide unneeded lifetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdyer committed Jan 24, 2025
1 parent b245505 commit 345b86c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl<'a> From<&'a Deepgram> for Speak<'a> {
}
}

impl<'a> Transcription<'a> {
impl Transcription<'_> {
/// Expose a method to access the inner `Deepgram` reference if needed.
pub fn deepgram(&self) -> &Deepgram {
self.0
Expand Down
9 changes: 4 additions & 5 deletions src/listen/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ impl Transcription<'_> {
///
/// assert_eq!(&builder.urlencoded().unwrap(), "model=nova-2&detect_language=true&no_delay=true")
/// ```
pub fn stream_request_with_options(&self, options: Options) -> WebsocketBuilder<'_> {
WebsocketBuilder {
deepgram: self.0,
Expand Down Expand Up @@ -166,7 +165,7 @@ impl Transcription<'_> {
}
}

impl<'a> WebsocketBuilder<'a> {
impl WebsocketBuilder<'_> {
/// Return the options in urlencoded format. If serialization would
/// fail, this will also return an error.
///
Expand Down Expand Up @@ -331,7 +330,7 @@ impl<'a> WebsocketBuilder<'a> {
}
}

impl<'a> WebsocketBuilder<'a> {
impl WebsocketBuilder<'_> {
pub async fn file(
self,
filename: impl AsRef<Path>,
Expand Down Expand Up @@ -650,8 +649,8 @@ pub struct WebsocketHandle {
request_id: Uuid,
}

impl<'a> WebsocketHandle {
async fn new(builder: WebsocketBuilder<'a>) -> Result<WebsocketHandle> {
impl WebsocketHandle {
async fn new(builder: WebsocketBuilder<'_>) -> Result<WebsocketHandle> {
let url = builder.as_url()?;

let request = {
Expand Down
2 changes: 1 addition & 1 deletion src/speak/rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use super::options::{Options, SerializableOptions};

static DEEPGRAM_API_URL_SPEAK: &str = "v1/speak";

impl<'a> Speak<'a> {
impl Speak<'_> {
/// Sends a request to Deepgram to transcribe pre-recorded audio.
pub async fn speak_to_file(
&self,
Expand Down

0 comments on commit 345b86c

Please sign in to comment.