Upgrade socket2 and log
This commit is contained in:
parent
89d39cc5ab
commit
863a295aae
@ -1,8 +1,9 @@
|
|||||||
|
extern crate linked_hash_map;
|
||||||
|
extern crate marksman_escape;
|
||||||
extern crate phf_codegen;
|
extern crate phf_codegen;
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
extern crate marksman_escape;
|
|
||||||
extern crate linked_hash_map;
|
|
||||||
|
|
||||||
|
#[allow(unused_imports)]
|
||||||
use std::ascii::AsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
#[allow(unused_imports)]
|
||||||
use std::ascii::AsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::{Write, BufWriter};
|
use std::io::{BufWriter, Write};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use marksman_escape::Escape;
|
use marksman_escape::Escape;
|
||||||
|
|
||||||
@ -164,7 +165,8 @@ pub enum Inner {{"
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn make_impl(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
|
fn make_impl(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
|
||||||
write!(w,
|
write!(
|
||||||
|
w,
|
||||||
"impl Inner {{
|
"impl Inner {{
|
||||||
pub fn from_oid(oid: Oid) -> Option<Inner> {{
|
pub fn from_oid(oid: Oid) -> Option<Inner> {{
|
||||||
match oid {{
|
match oid {{
|
||||||
@ -181,7 +183,8 @@ fn make_impl(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
|
|||||||
).unwrap();
|
).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
write!(w,
|
write!(
|
||||||
|
w,
|
||||||
" _ => None,
|
" _ => None,
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
@ -202,7 +205,8 @@ fn make_impl(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
|
|||||||
).unwrap();
|
).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
write!(w,
|
write!(
|
||||||
|
w,
|
||||||
" Inner::Other(ref u) => u.oid,
|
" Inner::Other(ref u) => u.oid,
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
@ -232,7 +236,8 @@ fn make_impl(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
|
|||||||
).unwrap();
|
).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
write!(w,
|
write!(
|
||||||
|
w,
|
||||||
r#" Inner::Other(ref u) => &u.kind,
|
r#" Inner::Other(ref u) => &u.kind,
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
@ -263,7 +268,8 @@ r#" Inner::Other(ref u) => &u.kind,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn make_consts(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
|
fn make_consts(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
|
||||||
write!(w,
|
write!(
|
||||||
|
w,
|
||||||
"pub mod consts {{
|
"pub mod consts {{
|
||||||
use types::Type;
|
use types::Type;
|
||||||
use types::type_gen::Inner;
|
use types::type_gen::Inner;
|
||||||
@ -271,17 +277,17 @@ fn make_consts(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
|
|||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
||||||
for type_ in types.values() {
|
for type_ in types.values() {
|
||||||
write!(w,
|
write!(
|
||||||
|
w,
|
||||||
"
|
"
|
||||||
/// {docs}
|
/// {docs}
|
||||||
pub const {ident}: Type = Type(Inner::{variant});
|
pub const {ident}: Type = Type(Inner::{variant});
|
||||||
",
|
",
|
||||||
docs = type_.doc,
|
docs = type_.doc,
|
||||||
ident = type_.ident,
|
ident = type_.ident,
|
||||||
variant = type_.variant).unwrap();
|
variant = type_.variant
|
||||||
}
|
|
||||||
|
|
||||||
write!(w,
|
|
||||||
"}}"
|
|
||||||
).unwrap();
|
).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
write!(w, "}}").unwrap();
|
||||||
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use fallible_iterator::FallibleIterator;
|
use fallible_iterator::FallibleIterator;
|
||||||
use postgres_protocol::message::backend::DataRowBody;
|
use postgres_protocol::message::backend::DataRowBody;
|
||||||
|
#[allow(unused_imports)]
|
||||||
use std::ascii::AsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::ops::Range;
|
use std::ops::Range;
|
||||||
@ -43,9 +44,8 @@ impl Sealed for str {
|
|||||||
// FIXME ASCII-only case insensitivity isn't really the right thing to
|
// FIXME ASCII-only case insensitivity isn't really the right thing to
|
||||||
// do. Postgres itself uses a dubious wrapper around tolower and JDBC
|
// do. Postgres itself uses a dubious wrapper around tolower and JDBC
|
||||||
// uses the US locale.
|
// uses the US locale.
|
||||||
stmt.iter().position(
|
stmt.iter()
|
||||||
|d| d.name().eq_ignore_ascii_case(self),
|
.position(|d| d.name().eq_ignore_ascii_case(self))
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,8 +58,8 @@ no-logging = []
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
fallible-iterator = "0.1.3"
|
fallible-iterator = "0.1.3"
|
||||||
log = "0.3"
|
log = "0.4"
|
||||||
socket2 = "0.2"
|
socket2 = "0.3"
|
||||||
|
|
||||||
openssl = { version = "0.9.2", optional = true }
|
openssl = { version = "0.9.2", optional = true }
|
||||||
native-tls = { version = "0.1", optional = true }
|
native-tls = { version = "0.1", optional = true }
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
#[allow(unused_imports)]
|
||||||
use std::ascii::AsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
|
|
||||||
use {bad_response, Result, Connection};
|
use {bad_response, Connection, Result};
|
||||||
use rows::Rows;
|
use rows::Rows;
|
||||||
use stmt::Statement;
|
use stmt::Statement;
|
||||||
use types::ToSql;
|
use types::ToSql;
|
||||||
|
Loading…
Reference in New Issue
Block a user