Fix compiling with OpenSSL#7621
Conversation
📝 WalkthroughWalkthroughOpenSSL integration code refactored to switch from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/stdlib/src/openssl.rs (1)
1464-1464: Minor:hint.to_string()vshint.as_ref().to_owned().
hint.to_string()goes through theDisplayimpl, which works, buthint.as_ref().to_owned()would be more consistent with the other sites in this PR (all other conversions now bind&strviaas_ref()) and avoids any formatter overhead. Purely stylistic — feel free to ignore.Optional nit
- *self.psk_identity_hint.lock() = Some(hint.to_string()); + *self.psk_identity_hint.lock() = Some(hint.as_ref().to_owned());🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/stdlib/src/openssl.rs` at line 1464, The assignment to *self.psk_identity_hint.lock() uses hint.to_string() which goes through Display; change it to use hint.as_ref().to_owned() to match the other conversions in this PR and avoid formatter overhead—locate the line that assigns Some(hint.to_string()) in the block where self.psk_identity_hint.lock() is set and replace the call with Some(hint.as_ref().to_owned()).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@crates/stdlib/src/openssl.rs`:
- Line 1464: The assignment to *self.psk_identity_hint.lock() uses
hint.to_string() which goes through Display; change it to use
hint.as_ref().to_owned() to match the other conversions in this PR and avoid
formatter overhead—locate the line that assigns Some(hint.to_string()) in the
block where self.psk_identity_hint.lock() is set and replace the call with
Some(hint.as_ref().to_owned()).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 2506b2cf-3f56-4dd4-9b55-67ef54d52b94
📒 Files selected for processing (1)
crates/stdlib/src/openssl.rs
This PR fixes compiling with
--features=ssl-openssl. Nothing fancy. I fixed some lints.Summary by CodeRabbit