diff --git a/librarian.yaml b/librarian.yaml index fc41eb13cb..da0ececb18 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -1280,7 +1280,6 @@ libraries: version: 1.4.0 copyright_year: "2025" output: src/pubsub - skip_release: true rust: modules: - included_ids: diff --git a/src/pubsub/src/publisher/builder.rs b/src/pubsub/src/publisher/builder.rs index b6c7d27eb1..65edce269b 100644 --- a/src/pubsub/src/publisher/builder.rs +++ b/src/pubsub/src/publisher/builder.rs @@ -140,8 +140,8 @@ impl PublisherBuilder { /// .await?; /// # Ok(()) } /// ``` - pub fn set_hedging_options>(mut self, v: V) -> Self { - self.hedging_options = Some(v.into()); + pub fn set_hedging_options(mut self, v: HedgingOptions) -> Self { + self.hedging_options = Some(v); self } @@ -156,16 +156,13 @@ impl PublisherBuilder { /// # use google_cloud_pubsub::publisher::HedgingOptions; /// # async fn sample() -> anyhow::Result<()> { /// let publisher = Publisher::builder("projects/my-project/topics/my-topic") - /// .set_or_clear_hedging_options(None::) + /// .set_or_clear_hedging_options(None) /// .build() /// .await?; /// # Ok(()) } /// ``` - pub fn set_or_clear_hedging_options(mut self, v: Option) -> Self - where - V: Into, - { - self.hedging_options = v.map(Into::into); + pub fn set_or_clear_hedging_options(mut self, v: Option) -> Self { + self.hedging_options = v; self } @@ -460,8 +457,8 @@ impl PublisherPartialBuilder { /// .build(); /// # Ok(()) } /// ``` - pub fn set_hedging_options>(mut self, v: V) -> Self { - self.hedging_options = Some(v.into()); + pub fn set_hedging_options(mut self, v: HedgingOptions) -> Self { + self.hedging_options = Some(v); self } @@ -478,15 +475,12 @@ impl PublisherPartialBuilder { /// # let client: BasePublisher = BasePublisher::builder().build().await?; /// let publisher = client /// .publisher("projects/my-project/topics/my-topic") - /// .set_or_clear_hedging_options(None::) + /// .set_or_clear_hedging_options(None) /// .build(); /// # Ok(()) } /// ``` - pub fn set_or_clear_hedging_options(mut self, v: Option) -> Self - where - V: Into, - { - self.hedging_options = v.map(Into::into); + pub fn set_or_clear_hedging_options(mut self, v: Option) -> Self { + self.hedging_options = v; self }