Changed to a library from an executable.
This commit is contained in:
6
src/lib.rs
Normal file
6
src/lib.rs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
//! Shared types and useful components.
|
||||||
|
mod info;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pub use crate::info::{get_name, get_version};
|
18
src/main.rs
18
src/main.rs
@ -1,18 +0,0 @@
|
|||||||
//! Shared types and useful components.
|
|
||||||
|
|
||||||
mod info;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Print the version.
|
|
||||||
fn print_version()
|
|
||||||
{
|
|
||||||
println!("{} v{}", info::get_name(), info::get_version());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fn main()
|
|
||||||
{
|
|
||||||
print_version();
|
|
||||||
}
|
|
Reference in New Issue
Block a user