Azure / Azure/azure-sdk-for-rust

Warning-as-error in Cosmos for deprecated function

Open Beginner friendly
#5,128 0 comments 1 reaction 0 assignees View on GitHub
Client Cosmos
Dominant language
Rust
Stars
884
Forks
365
Avg merge
2d 19h
Merged PRs (30d)
109

Description

When building with the nightly toochain, we get a warning that will be an error in build:

```
warning: use of deprecated method `std::sync::atomic::Atomic::::fetch_update`: renamed to `try_update` for consistency
--> sdk/cosmos/azure_data_cosmos_perf/src/runner.rs:757:10
|
757 | .fetch_update(Ordering::Relaxed, Ordering::Relaxed, |current| {
| ^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
help: replace the use of the deprecated method
|
757 - .fetch_update(Ordering::Relaxed, Ordering::Relaxed, |current| {
757 + .try_update(Ordering::Relaxed, Ordering::Relaxed, |current| {
|
```

Contributor guide

Open the contributing guide

Research direction

Open sdk/cosmos/azure_data_cosmos_perf/src/runner.rs and inspect the deprecated atomic method at line 757. Replace the deprecated call as indicated by the nightly compiler warning, then build with the nightly toolchain and confirm the warning no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
90/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.