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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! # Cargo merge
//!
//! A cargo subcommand that merges your crate source code into a single file.
//!
//! The initial purpose of this command is to merge your whole crate as a single source file that can be used on competitive programming platforms.
//!
//! It works by expanding module imports by detecting them with regex, rewriting some "use" statements in the process.
//!
//! ## Install
//! Just run the following command:
//! ```bash
//! cargo install cargo-merge
//! ```
//!
//! ## Usage
//! Simply call the cargo sub command inside your crate folder hierarchy (it can be any folder below the one containing your `Cargo.toml` file):
//! ```bash
//! cargo merge
//! ```
//!
//! This will generate a merged file in `target/merge/merged.rs`.
//!
//! ## Options
//!
//! | Long flag | Short flag | Description |
//! |-|-|-|
//! | `-s` | `--silence-standard-error-output` | Remove all the usages of `eprint!` and `eprintln!` macros from your code. |
//!
use StructOpt;
use crateOpts;
use crateMerge;
use LevelFilter;
/// Main entry point