1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use cratewrite_to_file;
use Result;
/// # Name: write_to_module
/// This function writes a new Rust module to a Rust source file.
/// # Arguments:
/// * module_path: &String
/// * module: Vec<String>
/// # Returns:
/// * Result<(), std::io::Error>
/// # Example:
/// ```
/// use std::vec;
/// use rustyroad::writers::write_to_module;
///
/// use std::io::Error;
///
///
///let name = "test";
///let mut components = Vec::new();
///
/// components.push(name.to_string());
///
/// let module_path = "src/test.rs".to_string();
///
///
/// write_to_module(&module_path, components);
/// ```