We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88d9f8f commit db51756Copy full SHA for db51756
sqlx-core/src/sql_str.rs
@@ -1,6 +1,6 @@
1
use std::borrow::Borrow;
2
use std::hash::{Hash, Hasher};
3
-use std::sync::{Arc, Mutex};
+use std::sync::Arc;
4
5
/// A SQL string that is safe to execute on a database connection.
6
///
@@ -125,16 +125,8 @@ enum Repr {
125
ArcString(Arc<String>),
126
}
127
128
-static COUNT_CLONES: Mutex<usize> = Mutex::new(0usize);
129
-
130
impl Clone for SqlStr {
131
fn clone(&self) -> Self {
132
- let mut lock = COUNT_CLONES.lock().unwrap();
133
- *lock += 1;
134
- let clones: usize = *lock;
135
- drop(lock);
136
137
- println!("------- Count clones: {clones} --------\n\n\n");
138
Self(match &self.0 {
139
Repr::Static(s) => Repr::Static(s),
140
Repr::Arced(s) => Repr::Arced(s.clone()),
0 commit comments