Rust-Programming-Cookbook/Chapter04/sample_split.rs

25 wiersze
531 B
Rust
Czysty Zwykły widok Historia

2017-07-31 06:59:18 +00:00
//-- #########################
//-- Task: To create a sample file structure
//-- Author: Vigneshwer.D
//-- Version: 1.0.0
//-- Date: 4 March 17
//-- #########################
// Using the contents of sample_module
mod sample_module;
// Defining a local sample_function
fn sample_function() {
println!("called `sample_function()`");
}
// Execution starts here
fn main() {
sample_module::sample_function();
sample_function();
sample_module::indirect_access();
sample_module::nested_mod::sample_function();
}