Browse Source

Added documentation to main

Lorenz Bung 7 years ago
parent
commit
64a3b81309
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      hw7/task2/src/main.rs

+ 4
- 0
hw7/task2/src/main.rs View File

4
 use std::io;
4
 use std::io;
5
 use task2::Shell;
5
 use task2::Shell;
6
 
6
 
7
+
8
+/// Diese Funktion startet die Shell durch Aufruf
9
+/// von `Shell::new()`.
7
 fn main() {
10
 fn main() {
8
     let stdin = io::stdin();
11
     let stdin = io::stdin();
9
     let stdout = io::stdout();
12
     let stdout = io::stdout();
10
 
13
 
11
     let mut s = Shell::new(stdin.lock(), stdout.lock(), "schell".to_string());
14
     let mut s = Shell::new(stdin.lock(), stdout.lock(), "schell".to_string());
15
+    // Kontrolliertes bzw. unkontrolliertes Beenden der Shell
12
     match s.start() {
16
     match s.start() {
13
         Ok(_) => process::exit(0),
17
         Ok(_) => process::exit(0),
14
         Err(_) => process::exit(1),
18
         Err(_) => process::exit(1),

Loading…
Cancel
Save