Browse Source

Organize modules in new source files

master
Georg Hopp 6 years ago
parent
commit
f30c5ef1f2
Signed by: ghopp GPG Key ID: 4C5D226768784538
  1. 27
      restaurant/src/front_of_house.rs
  2. 23
      restaurant/src/front_of_house/hosting.rs
  3. 13
      restaurant/src/lib.rs

27
restaurant/src/front_of_house.rs

@ -0,0 +1,27 @@
//
// Move some restaurant stuff in a different file....
//
// Georg Hopp <georg@steffers.org>
//
// Copyright © 2019 Georg Hopp
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
pub mod hosting;
mod serving {
fn take_order() {}
fn take_payment() {}
}

23
restaurant/src/front_of_house/hosting.rs

@ -0,0 +1,23 @@
//
// Now also sepatate hosting....
//
// Georg Hopp <georg@steffers.org>
//
// Copyright © 2019 Georg Hopp
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
pub fn add_to_waitlist() {}
fn seat_at_table() {}

13
restaurant/src/lib.rs

@ -19,18 +19,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
// //
mod front_of_house {
pub mod hosting {
pub fn add_to_waitlist() {}
fn seat_at_table() {}
}
mod serving {
fn take_order() {}
fn take_payment() {}
}
}
mod front_of_house;
fn serve_order() {} fn serve_order() {}

Loading…
Cancel
Save