Skip to content

Conversation

@keaz
Copy link
Owner

@keaz keaz commented Nov 17, 2025

  • Switch streaming_search, streaming_search_paged, and to_native_stream to return boxed streams (Pin<Box<dyn Stream<…> + 'a>>) rather than nested impl Trait.

    • Removes the need to add 'static bounds on A/S, restoring compilation on Rust 1.91.1 while keeping the existing API surface otherwise unchanged.

    Testing

    • cargo check
    • (Integration) run docker compose up -d then cargo test against the OpenDJ container.

    Issue

@keaz keaz requested a review from Iizuki November 17, 2025 15:50
@keaz keaz self-assigned this Nov 17, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

simple-ldap/src/lib.rs

Lines 1331 to 1334 in 6180ca3

match result {
Ok(result) => {
let mut stream = Box::pin(result);
while let Some(member) = stream.next().await {

P1 Badge Stop re-pinning streaming_search result

After changing streaming_search to return Pin<Box<dyn Stream<…>>>, the value obtained in Ok(result) is already pinned. Re-wrapping it with Box::pin(result) now produces a Pin<Box<Pin<Box<_>>>>, which no longer implements Stream, so this function fails to compile (stream.next() is not available on the nested pin). The match arm should just use the returned pin directly (or move it into a mutable binding) instead of re-pinning it.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@keaz keaz marked this pull request as draft November 18, 2025 05:02
@Iizuki
Copy link
Collaborator

Iizuki commented Nov 18, 2025

This feels ad hoc.

I think we should hold off for now and just wait for the next rust version. Code that compiles in one version should compile in the next too.

Alternatively we should at least try to understand why it suddenly wants a 'static bound?

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.

Build fails on rust 1.91

3 participants