Cargo.toml: Update dependencies
This commit is contained in:
713
Cargo.lock
generated
713
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -7,12 +7,12 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
clap = "2.33.0"
|
||||
indicatif = "0.14.0"
|
||||
indicatif = "0.15.0"
|
||||
jemallocator = "0.3.2"
|
||||
openssl = "0.10.32"
|
||||
postgres = "0.17.0"
|
||||
postgres-openssl = "0.3.0"
|
||||
rand = "0.7.2"
|
||||
postgres = "0.19.0"
|
||||
postgres-openssl = "0.5.0"
|
||||
rand = "0.8.0"
|
||||
rayon = "1.3.0"
|
||||
string_cache = "0.8.0"
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
// limitations under the License.
|
||||
|
||||
use indicatif::{ProgressBar, ProgressStyle};
|
||||
use postgres::{fallible_iterator::FallibleIterator, Client};
|
||||
use openssl::ssl::{SslConnector, SslMethod, SslVerifyMode};
|
||||
use postgres::{fallible_iterator::FallibleIterator, types::ToSql, Client};
|
||||
use postgres_openssl::MakeTlsConnector;
|
||||
use rand::{distributions::Alphanumeric, thread_rng, Rng};
|
||||
use std::{borrow::Cow, collections::BTreeMap, fmt, iter};
|
||||
use std::{borrow::Cow, collections::BTreeMap, fmt};
|
||||
|
||||
use super::StateGroupEntry;
|
||||
|
||||
@@ -92,12 +92,10 @@ fn get_initial_data_from_db(
|
||||
"#;
|
||||
|
||||
let mut rows = if let Some(s) = max_state_group {
|
||||
client.query_raw(
|
||||
format!(r"{} AND m.id <= $2", sql).as_str(),
|
||||
vec![&room_id as _, &s as _],
|
||||
)
|
||||
let params: Vec<&dyn ToSql> = vec![&room_id, &s];
|
||||
client.query_raw(format!(r"{} AND m.id <= $2", sql).as_str(), params)
|
||||
} else {
|
||||
client.query_raw(sql, iter::once(&room_id as _))
|
||||
client.query_raw(sql, &[room_id])
|
||||
}
|
||||
.unwrap();
|
||||
|
||||
@@ -140,7 +138,7 @@ fn get_missing_from_db(client: &mut Client, missing_sgs: &[i64]) -> BTreeMap<i64
|
||||
FROM state_group_edges
|
||||
WHERE state_group = ANY($1)
|
||||
"#,
|
||||
iter::once(&missing_sgs as _),
|
||||
&[missing_sgs],
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -167,7 +165,11 @@ impl<'a> fmt::Display for PGEscape<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let mut delim = Cow::from("$$");
|
||||
while self.0.contains(&delim as &str) {
|
||||
let s: String = thread_rng().sample_iter(&Alphanumeric).take(10).collect();
|
||||
let s: String = thread_rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(10)
|
||||
.map(char::from)
|
||||
.collect();
|
||||
|
||||
delim = format!("${}$", s).into();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user