Skip to content

Commit 08049f3

Browse files
committed
Fix deprecated methods
1 parent 5cb458a commit 08049f3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

collector/src/execute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::fs::{self, File};
1414
use std::hash;
1515
use std::io::Read;
1616
use std::path::{Path, PathBuf};
17-
use std::process::{self, Command, Stdio};
17+
use std::process::{self, Command};
1818
use std::str;
1919
use std::mem::ManuallyDrop;
2020
use std::time::Duration;

site/src/server.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,10 @@ impl UpdatingStatus {
13691369

13701370
// Returns previous state
13711371
fn set_updating(&self) -> bool {
1372-
self.0.compare_and_swap(false, true, AtomicOrdering::SeqCst)
1372+
match self.0.compare_exchange(false, true, AtomicOrdering::SeqCst, AtomicOrdering::SeqCst) {
1373+
Ok(b) => b,
1374+
Err(b) => b
1375+
}
13731376
}
13741377

13751378
fn release_on_drop(&self, channel: hyper::body::Sender) -> IsUpdating {

0 commit comments

Comments
 (0)