Skip to content

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

@azure-sdk-automation

Description

@azure-sdk-automation

Bad code snippet:

pub fn new(endpoint: &str, credential: Arc<(dyn TokenCredential)>, options: Option<SecretClientOptions>) -> Result<Self> {}

What it should do:
The APIView comment cites the Rust AsRef parameter guideline and suggests changing endpoint to impl AsRef<str>, 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:

pub fn new(endpoint: &str, credential: Arc<dyn TokenCredential>, options: Option<SecretClientOptions>) -> Result<Self> {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions