1
Fork 0

Use slice syntax instead of slice_to, etc.

This commit is contained in:
Nick Cameron 2014-09-24 23:41:09 +12:00
parent a70a0374e2
commit 40b9f5ded5
81 changed files with 331 additions and 363 deletions

View file

@ -698,7 +698,7 @@ impl Clean<Item> for ast::Method {
let all_inputs = &self.pe_fn_decl().inputs;
let inputs = match self.pe_explicit_self().node {
ast::SelfStatic => all_inputs.as_slice(),
_ => all_inputs.slice_from(1)
_ => all_inputs[1..]
};
let decl = FnDecl {
inputs: Arguments {
@ -737,7 +737,7 @@ impl Clean<Item> for ast::TypeMethod {
fn clean(&self, cx: &DocContext) -> Item {
let inputs = match self.explicit_self.node {
ast::SelfStatic => self.decl.inputs.as_slice(),
_ => self.decl.inputs.slice_from(1)
_ => self.decl.inputs[1..]
};
let decl = FnDecl {
inputs: Arguments {
@ -1009,7 +1009,7 @@ impl Clean<Item> for ty::Method {
self.fty.sig.clone()),
s => {
let sig = ty::FnSig {
inputs: self.fty.sig.inputs.slice_from(1).to_vec(),
inputs: self.fty.sig.inputs[1..].to_vec(),
..self.fty.sig.clone()
};
let s = match s {