Skip to content

Drop deprecated Connector setters and TlsOptions constructors - #93

Merged
kezhuw merged 1 commit into
masterfrom
drop-deprecated-code
Aug 11, 2026
Merged

kezhuw merged 1 commit into
masterfrom
drop-deprecated-code

Conversation

@kezhuw

@kezhuw kezhuw commented Aug 11, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes previously-deprecated public APIs from the TLS options and client Connector builders, simplifying the surface area and nudging users onto the non-deprecated with_*/new APIs.

Changes:

  • Removed deprecated TlsOptions constructors and CA helper (no_ca, with_pem_ca_certs) along with the internal TlsCa::merge helper used only by that deprecated path.
  • Removed deprecated Connector setter-style methods in favor of the consuming builder-style with_* methods.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/tls/options.rs Drops deprecated TLS option constructors/helpers and their supporting merge helper.
src/client/mod.rs Drops deprecated Connector setter methods, leaving only the with_* builder API.
Suppressed comments (1)

src/client/mod.rs:1751

  • The doc comment references [Self::session_timeout], but Connector::session_timeout was removed in this PR (only with_session_timeout remains), so this becomes a broken intra-doc link. Please update this reference (and also update the similar [Self::fail_eagerly] / [Self::session_timeout] links in the connect() doc comment later in this impl) to point at the remaining with_* builder methods.
    /// Fail session establishment eagerly with [Error::NoHosts] when all hosts has been tried.
    ///
    /// This permits fail-fast without wait up to [Self::session_timeout] in [Self::connect]. This
    /// is not suitable for situations where ZooKeeper cluster is accessible via a single virtual IP.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/client/mod.rs:1814

  • Docstring grammar issues: “is turn on” → “is turned on”, and “with in approximate” → “within approximately”.
    /// * [Error::NoHosts] if no host is available and [Self::with_fail_eagerly] is turn on
    /// * [Error::SessionExpired] if specified session expired
    /// * [Error::Timeout] if no session established with in approximate [Self::with_session_timeout]

src/client/mod.rs:1750

  • Docstring grammar: “when all hosts has been tried” should be “have been tried”, and “without wait” should be “without waiting” for readability.

This issue also appears on line 1812 of the same file.

    /// Fail session establishment eagerly with [Error::NoHosts] when all hosts has been tried.
    ///
    /// This permits fail-fast without wait up to [Self::with_session_timeout] in [Self::connect]. This

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/client/mod.rs:1710

  • Connector::session has been removed, but there is still a rustdoc link to it in src/session/types.rs (see SessionInfo doc comment referencing [Connector::session]). This will produce an unresolved rustdoc link warning (and can fail docs builds if warnings are denied). Please update those docs to reference Connector::with_session (or otherwise remove the link).
    /// Specifies session to reestablish.
    pub fn with_session(mut self, session: SessionInfo) -> Self {
        self.session = Some(session);
        self
    }

@kezhuw
kezhuw enabled auto-merge (squash) August 11, 2026 09:33
@kezhuw
kezhuw merged commit 254f89e into master Aug 11, 2026
27 checks passed
@kezhuw
kezhuw deleted the drop-deprecated-code branch August 11, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants