From a151a5ba020b7713a4a50081393bc57e6edffa1e Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Fri, 31 Oct 2014 08:51:27 -0700 Subject: [PATCH] Update for rust changes --- src/error.rs | 2 +- src/lib.rs | 2 +- src/types/array.rs | 4 ++-- src/types/mod.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/error.rs b/src/error.rs index e75304f6..3b660b91 100644 --- a/src/error.rs +++ b/src/error.rs @@ -14,7 +14,7 @@ macro_rules! make_errors( ($($code:expr => $error:ident),+) => ( /// SQLSTATE error codes #[deriving(PartialEq, Eq, Clone, Show)] - #[allow(missing_doc)] + #[allow(missing_docs)] pub enum PostgresSqlState { $($error,)+ UnknownSqlState(String) diff --git a/src/lib.rs b/src/lib.rs index 952e038d..4f2a5a13 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -52,7 +52,7 @@ //! ``` #![doc(html_root_url="https://sfackler.github.io/doc")] #![feature(macro_rules, struct_variant, phase, unsafe_destructor, slicing_syntax, default_type_params, if_let)] -#![warn(missing_doc)] +#![warn(missing_docs)] extern crate collections; extern crate openssl; diff --git a/src/types/array.rs b/src/types/array.rs index 4213f759..5e3c70db 100644 --- a/src/types/array.rs +++ b/src/types/array.rs @@ -139,7 +139,7 @@ impl ArrayBase { for (info1, info2) in self.info.iter().skip(1).zip(other.info.iter()) { assert!(info1 == info2, "Cannot join differently shaped arrays"); } - self.info.get_mut(0).len += 1; + self.info[0].len += 1; self.data.extend(other.data.into_iter()); } @@ -197,7 +197,7 @@ impl InternalArray for ArrayBase { impl InternalMutableArray for ArrayBase { fn raw_get_mut<'a>(&'a mut self, idx: uint, _size: uint) -> &'a mut T { - self.data.get_mut(idx) + &mut self.data[idx] } } diff --git a/src/types/mod.rs b/src/types/mod.rs index 97794336..50bcaa34 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -4,7 +4,7 @@ use serialize::json; use serialize::json::Json; use std::collections::HashMap; -use std::io::{MemWriter, BufReader}; +use std::io::{AsRefReader, MemWriter, BufReader}; use std::io::util::LimitReader; use time::Timespec;