Skip to content

Commit 413525e

Browse files
committed
fix incorrect impl method declarations
These were found due to the compiler fixes in rust-lang/rust#38897
1 parent 98fa749 commit 413525e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/fileio.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ impl PartIO for PartFileIO {
190190
self.paths.paths.get(ss_num).map(|&(ref p, _)| p.is_some()).unwrap_or(false)
191191
}
192192

193-
fn read_ss<'a>(&self, ss_num: usize) -> Result<Option<Box<Read+'a>>> {
193+
fn read_ss<'a>(&'a self, ss_num: usize) -> Result<Option<Box<Read+'a>>> {
194194
// Cannot replace `match` with `map` since `try!()` cannot be used in a closure
195195
Ok(match self.paths.paths.get(ss_num) {
196196
Some(&(ref p, _)) => {
@@ -205,7 +205,7 @@ impl PartIO for PartFileIO {
205205
})
206206
}
207207

208-
fn read_ss_cl<'a>(&self, ss_num: usize, cl_num: usize) -> Result<Option<Box<Read+'a>>> {
208+
fn read_ss_cl<'a>(&'a self, ss_num: usize, cl_num: usize) -> Result<Option<Box<Read+'a>>> {
209209
Ok(match self.paths.paths.get(ss_num).and_then(|&(_, ref logs)| logs.get(cl_num)) {
210210
Some(p) => {
211211
trace!("Reading log file: {}", p.display());
@@ -215,7 +215,7 @@ impl PartIO for PartFileIO {
215215
})
216216
}
217217

218-
fn new_ss<'a>(&mut self, ss_num: usize) -> Result<Option<Box<Write+'a>>> {
218+
fn new_ss<'a>(&'a mut self, ss_num: usize) -> Result<Option<Box<Write+'a>>> {
219219
if self.readonly {
220220
return ReadOnly::err();
221221
}
@@ -235,7 +235,7 @@ impl PartIO for PartFileIO {
235235
Ok(Some(Box::new(stream)))
236236
}
237237

238-
fn append_ss_cl<'a>(&mut self, ss_num: usize, cl_num: usize) -> Result<Option<Box<Write+'a>>> {
238+
fn append_ss_cl<'a>(&'a mut self, ss_num: usize, cl_num: usize) -> Result<Option<Box<Write+'a>>> {
239239
if self.readonly {
240240
return ReadOnly::err();
241241
}
@@ -247,7 +247,7 @@ impl PartIO for PartFileIO {
247247
None => None
248248
})
249249
}
250-
fn new_ss_cl<'a>(&mut self, ss_num: usize, cl_num: usize) -> Result<Option<Box<Write+'a>>> {
250+
fn new_ss_cl<'a>(&'a mut self, ss_num: usize, cl_num: usize) -> Result<Option<Box<Write+'a>>> {
251251
if self.readonly {
252252
return ReadOnly::err();
253253
}

0 commit comments

Comments
 (0)