mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 22:04:19 +08:00
Use shorthand init
This commit is contained in:
parent
1a64fd7d98
commit
213a33bb43
@ -10,8 +10,8 @@ pub struct ProgressBarRead<'p, 'r, P: Write + 'p, R: Read + 'r> {
|
||||
impl<'p, 'r, P: Write, R: Read> ProgressBarRead<'p, 'r, P, R> {
|
||||
pub fn new(pb: &'p mut ProgressBar<P>, r: &'r mut R) -> ProgressBarRead<'p, 'r, P, R> {
|
||||
ProgressBarRead {
|
||||
pb: pb,
|
||||
r: r
|
||||
pb,
|
||||
r
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -32,8 +32,8 @@ pub struct ProgressBarWrite<'p, 'w, P: Write + 'p, W: Write + 'w> {
|
||||
impl<'p, 'w, P: Write, W: Write> ProgressBarWrite<'p, 'w, P, W> {
|
||||
pub fn new(pb: &'p mut ProgressBar<P>, w: &'w mut W) -> ProgressBarWrite<'p, 'w, P, W> {
|
||||
ProgressBarWrite {
|
||||
pb: pb,
|
||||
w: w
|
||||
pb,
|
||||
w
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user