Skip to main content

conch_shell/
lib.rs

1//! Core library for the conch shell.
2//!
3//! This crate is consumed by the `conch` binary ([`main.rs`](../src/main.rs))
4//! and exists as its own library target so its public API can be
5//! documented and published on [docs.rs](https://docs.rs/conch-shell).
6
7/// Runs conch.
8///
9/// This is the single entry point the `conch` binary calls; keeping it in
10/// the library rather than inline in `main` keeps `main.rs` a thin wrapper
11/// and makes this function directly documented, testable, and reusable.
12pub fn run() {
13    println!("Hello, world!");
14}
15
16#[cfg(test)]
17mod tests {
18    use super::*;
19
20    #[test]
21    fn run_does_not_panic() {
22        run();
23    }
24}