Skip to content

Commit 131fa11

Browse files
committed
Remove remaining [] usage
1 parent a55c50a commit 131fa11

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,12 +529,12 @@ impl DbError {
529529
let mut map: HashMap<_, _> = fields.into_iter().collect();
530530
Ok(DbError {
531531
severity: try!(map.remove(&b'S').ok_or(())),
532-
code: SqlState::from_code(try!(map.remove(&b'C').ok_or(()))[]),
532+
code: SqlState::from_code(&*try!(map.remove(&b'C').ok_or(()))),
533533
message: try!(map.remove(&b'M').ok_or(())),
534534
detail: map.remove(&b'D'),
535535
hint: map.remove(&b'H'),
536536
position: match map.remove(&b'P') {
537-
Some(pos) => Some(ErrorPosition::Normal(try!(from_str(pos[]).ok_or(())))),
537+
Some(pos) => Some(ErrorPosition::Normal(try!(from_str(&*pos).ok_or(())))),
538538
None => match map.remove(&b'p') {
539539
Some(pos) => Some(ErrorPosition::Internal {
540540
position: try!(from_str(pos[]).ok_or(())),

src/types/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl<T> ArrayBase<T> {
155155

156156
impl<T> Array<T> for ArrayBase<T> {
157157
fn dimension_info<'a>(&'a self) -> &'a [DimensionInfo] {
158-
self.info[]
158+
&*self.info
159159
}
160160

161161
fn slice<'a>(&'a self, idx: int) -> ArraySlice<'a, T> {

src/types/uuid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use Result;
77

88
impl RawFromSql for Uuid {
99
fn raw_from_sql<R: Reader>(raw: &mut R) -> Result<Uuid> {
10-
match Uuid::from_bytes(try!(raw.read_to_end())[]) {
10+
match Uuid::from_bytes(&*try!(raw.read_to_end())) {
1111
Some(u) => Ok(u),
1212
None => Err(Error::BadData),
1313
}

src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ pub fn comma_join<'a, W, I>(writer: &mut W, mut strs: I) -> IoResult<()>
1414
}
1515

1616
pub fn parse_update_count(tag: String) -> uint {
17-
let s = tag[].split(' ').last().unwrap();
17+
let s = tag.split(' ').last().unwrap();
1818
from_str(s).unwrap_or(0)
1919
}

0 commit comments

Comments
 (0)