瀏覽代碼

Reworked basic trait impls

Lorenz Bung 8 年之前
父節點
當前提交
2c7006a0c3
共有 1 個檔案被更改,包括 2 行新增3 行删除
  1. 2
    3
      hw6/task2/src/shell.rs

+ 2
- 3
hw6/task2/src/shell.rs 查看文件

16
 }
16
 }
17
 
17
 
18
 impl BufRead for Shell<R, W> {
18
 impl BufRead for Shell<R, W> {
19
+    fn fill_buf(&mut self) -> Result<&[u8]> {}
20
+    fn consume(&mut self, amt: usize) {}
19
 }
21
 }
20
 
22
 
21
 impl Write for Shell<R, W> {
23
 impl Write for Shell<R, W> {
22
     fn write(&mut self, buf: &[u8]) -> Result<usize> {}
24
     fn write(&mut self, buf: &[u8]) -> Result<usize> {}
23
     fn flush(&mut self) -> Result<()> {}
25
     fn flush(&mut self) -> Result<()> {}
24
-    fn write_all(&mut self, buf: &[u8]) -> Result<()> {}
25
-    fn write_format(&mut self, fmt: Arguments) -> Result<()> {}
26
-    fn by_ref(&mut self) -> &mut Self where Self: Sized, {}
27
 }
26
 }
28
 
27
 
29
 
28
 

Loading…
取消
儲存