Azure / Azure/azure-sdk

[Rust APIView] SecretClient constructor guideline references outdated AsRef parameter guidance

Open Beginner friendly
#9,920 0 comments 0 reactions 0 assignees View on GitHub
customer-reported needs-triage question
Dominant language
PowerShell
Stars
597
Forks
374
Avg merge
5d 21h
Merged PRs (30d)
42

Description

Bad code snippet:
```Rust
pub fn new(endpoint: &str, credential: Arc<(dyn TokenCredential)>, options: Option) -> Result {}
```

What it should do:
The APIView comment cites the Rust `AsRef` parameter guideline and suggests changing `endpoint` to `impl AsRef`, but that guideline is out of date and the referenced `#rust-parameters-asref` section no longer exists. The documentation/guideline should be updated rather than treating this as a current API requirement.

Good code snippet:
```Rust
pub fn new(endpoint: &str, credential: Arc, options: Option) -> Result {}
```

Contributor guide

Open the contributing guide

Research direction

Locate the Rust APIView guideline text that cites the AsRef parameter guidance and the missing #rust-parameters-asref section. Update the documentation so this constructor is not treated as requiring impl AsRef, and confirm the outdated reference is removed or replaced with current guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.