Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3561055
D5114.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D5114.diff
View Options
diff --git a/services/backup/blob_client/src/get_client.rs b/services/backup/blob_client/src/get_client.rs
--- a/services/backup/blob_client/src/get_client.rs
+++ b/services/backup/blob_client/src/get_client.rs
@@ -11,7 +11,7 @@
use libc;
use libc::c_char;
use std::ffi::CStr;
-use std::sync::{Arc, Mutex};
+use std::sync::Mutex;
use tokio::runtime::Runtime;
use tokio::sync::mpsc;
use tokio::task::JoinHandle;
@@ -22,11 +22,11 @@
}
lazy_static! {
- static ref CLIENT: Arc<Mutex<Option<ReadClient>>> =
- Arc::new(Mutex::new(None));
+ static ref CLIENT: Mutex<Option<ReadClient>> =
+ Mutex::new(None);
static ref RUNTIME: Runtime = Runtime::new().unwrap();
- static ref ERROR_MESSAGES: Arc<Mutex<Vec<String>>> =
- Arc::new(Mutex::new(Vec::new()));
+ static ref ERROR_MESSAGES: Mutex<Vec<String>> =
+ Mutex::new(Vec::new());
}
fn is_initialized() -> bool {
diff --git a/services/backup/blob_client/src/put_client.rs b/services/backup/blob_client/src/put_client.rs
--- a/services/backup/blob_client/src/put_client.rs
+++ b/services/backup/blob_client/src/put_client.rs
@@ -13,7 +13,7 @@
use libc;
use libc::c_char;
use std::ffi::CStr;
-use std::sync::{Arc, Mutex};
+use std::sync::Mutex;
use tokio::runtime::Runtime;
use tokio::sync::mpsc;
use tokio::task::JoinHandle;
@@ -32,12 +32,12 @@
}
lazy_static! {
- static ref CLIENT: Arc<Mutex<Option<BidiClient>>> =
- Arc::new(Mutex::new(None));
+ static ref CLIENT: Mutex<Option<BidiClient>> =
+ Mutex::new(None);
// todo we should probably create separate clients for different IDs
static ref RUNTIME: Runtime = Runtime::new().unwrap();
- static ref ERROR_MESSAGES: Arc<Mutex<Vec<String>>> =
- Arc::new(Mutex::new(Vec::new()));
+ static ref ERROR_MESSAGES: Mutex<Vec<String>> =
+ Mutex::new(Vec::new());
}
fn is_initialized() -> bool {
diff --git a/services/backup/blob_client/src/tools.rs b/services/backup/blob_client/src/tools.rs
--- a/services/backup/blob_client/src/tools.rs
+++ b/services/backup/blob_client/src/tools.rs
@@ -1,10 +1,10 @@
use libc::c_char;
use std::ffi::{CStr, CString};
-use std::sync::{Arc, Mutex};
+use std::sync::Mutex;
use tracing::error;
pub fn report_error(
- error_messages: &Arc<Mutex<Vec<String>>>,
+ error_messages: &Mutex<Vec<String>>,
message: &str,
label_provided: Option<&str>,
) {
@@ -20,7 +20,7 @@
}
pub fn check_error(
- error_messages: &Arc<Mutex<Vec<String>>>,
+ error_messages: &Mutex<Vec<String>>,
) -> Result<(), String> {
if let Ok(errors) = error_messages.lock() {
return match errors.is_empty() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 8:32 AM (6 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2725009
Default Alt Text
D5114.diff (2 KB)
Attached To
Mode
D5114: [Services] Remove Arc usage
Attached
Detach File
Event Timeline
Log In to Comment