remove lib.rs and move contents to main.rs (#241)

This commit is contained in:
Crypto-Spartan 2022-01-13 13:13:12 -05:00 committed by GitHub
parent ec6c3b92a5
commit 56f11424dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 31 deletions

View File

@ -1,29 +0,0 @@
//! This library is just meant to supply needs for the `ouch` binary crate.
#![warn(missing_docs)]
// Bare URLs in doc comments are not a problem since this project is primarily
// used as a binary. Since `clap` doesn't remove URL markup in it's help output,
// we don't mark them as URLs. This suppresses the relevant rustdoc warning:
#![allow(rustdoc::bare_urls)]
// Macros should be declared before
pub mod macros;
pub mod archive;
pub mod cli;
pub mod commands;
pub mod error;
pub mod extension;
pub mod list;
pub mod progress;
pub mod utils;
/// CLI argparsing definitions, using `clap`.
pub mod opts;
pub use error::{Error, Result};
pub use opts::{Opts, Subcommand};
pub use utils::{QuestionAction, QuestionPolicy};
/// The status code returned from `ouch` on error
pub const EXIT_FAILURE: i32 = libc::EXIT_FAILURE;

View File

@ -1,9 +1,29 @@
use ouch::{commands, Opts, Result};
// Macros should be declared first
pub mod macros;
pub mod archive;
pub mod cli;
pub mod commands;
pub mod error;
pub mod extension;
pub mod list;
pub mod progress;
pub mod utils;
/// CLI argparsing definitions, using `clap`.
pub mod opts;
use error::{Error, Result};
use opts::{Opts, Subcommand};
use utils::{QuestionAction, QuestionPolicy};
/// The status code returned from `ouch` on error
pub const EXIT_FAILURE: i32 = libc::EXIT_FAILURE;
fn main() {
if let Err(err) = run() {
eprintln!("{}", err);
std::process::exit(ouch::EXIT_FAILURE);
std::process::exit(EXIT_FAILURE);
}
}