mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 11:35:45 +00:00
remove lib.rs and move contents to main.rs (#241)
This commit is contained in:
parent
ec6c3b92a5
commit
56f11424dc
29
src/lib.rs
29
src/lib.rs
@ -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;
|
24
src/main.rs
24
src/main.rs
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user