Remove remaining [] usage
This commit is contained in:
@@ -529,12 +529,12 @@ impl DbError {
|
||||
let mut map: HashMap<_, _> = fields.into_iter().collect();
|
||||
Ok(DbError {
|
||||
severity: try!(map.remove(&b'S').ok_or(())),
|
||||
code: SqlState::from_code(try!(map.remove(&b'C').ok_or(()))[]),
|
||||
code: SqlState::from_code(&*try!(map.remove(&b'C').ok_or(()))),
|
||||
message: try!(map.remove(&b'M').ok_or(())),
|
||||
detail: map.remove(&b'D'),
|
||||
hint: map.remove(&b'H'),
|
||||
position: match map.remove(&b'P') {
|
||||
Some(pos) => Some(ErrorPosition::Normal(try!(from_str(pos[]).ok_or(())))),
|
||||
Some(pos) => Some(ErrorPosition::Normal(try!(from_str(&*pos).ok_or(())))),
|
||||
None => match map.remove(&b'p') {
|
||||
Some(pos) => Some(ErrorPosition::Internal {
|
||||
position: try!(from_str(pos[]).ok_or(())),
|
||||
|
||||
@@ -155,7 +155,7 @@ impl<T> ArrayBase<T> {
|
||||
|
||||
impl<T> Array<T> for ArrayBase<T> {
|
||||
fn dimension_info<'a>(&'a self) -> &'a [DimensionInfo] {
|
||||
self.info[]
|
||||
&*self.info
|
||||
}
|
||||
|
||||
fn slice<'a>(&'a self, idx: int) -> ArraySlice<'a, T> {
|
||||
|
||||
@@ -7,7 +7,7 @@ use Result;
|
||||
|
||||
impl RawFromSql for Uuid {
|
||||
fn raw_from_sql<R: Reader>(raw: &mut R) -> Result<Uuid> {
|
||||
match Uuid::from_bytes(try!(raw.read_to_end())[]) {
|
||||
match Uuid::from_bytes(&*try!(raw.read_to_end())) {
|
||||
Some(u) => Ok(u),
|
||||
None => Err(Error::BadData),
|
||||
}
|
||||
|
||||
@@ -14,6 +14,6 @@ pub fn comma_join<'a, W, I>(writer: &mut W, mut strs: I) -> IoResult<()>
|
||||
}
|
||||
|
||||
pub fn parse_update_count(tag: String) -> uint {
|
||||
let s = tag[].split(' ').last().unwrap();
|
||||
let s = tag.split(' ').last().unwrap();
|
||||
from_str(s).unwrap_or(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user