mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-23 05:34:57 +02:00
docs: re-enable lib docs for development purposes (#750)
Enables lib docs, primarily intended for dev use. Also change some existing documentation based on warnings (mainly broken/bare links).
This commit is contained in:
parent
122373aff7
commit
c6f5d5488a
@ -20,8 +20,8 @@ doc = false
|
|||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
test = true
|
test = true
|
||||||
doctest = false
|
doctest = true
|
||||||
doc = false
|
doc = true
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = 0
|
debug = 0
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
//! - FreeBSD
|
//! - FreeBSD
|
||||||
//! - DragonFlyBSD
|
//! - DragonFlyBSD
|
||||||
//!
|
//!
|
||||||
//! For more information, see https://github.com/starship/rust-battery
|
//! For more information, refer to the [starship_battery](https://github.com/starship/rust-battery) repo/docs.
|
||||||
|
|
||||||
use starship_battery::{
|
use starship_battery::{
|
||||||
units::{power::watt, ratio::percent, time::second},
|
units::{power::watt, ratio::percent, time::second},
|
||||||
|
@ -59,7 +59,7 @@ impl FromStr for ColourScheme {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handles the canvas' state. TODO: [OPT] implement this.
|
/// Handles the canvas' state.
|
||||||
pub struct Painter {
|
pub struct Painter {
|
||||||
pub colours: CanvasColours,
|
pub colours: CanvasColours,
|
||||||
height: u16,
|
height: u16,
|
||||||
|
10
src/lib.rs
10
src/lib.rs
@ -1,3 +1,10 @@
|
|||||||
|
//! A customizable cross-platform graphical process/system monitor for the terminal.
|
||||||
|
//! Supports Linux, macOS, and Windows. Inspired by gtop, gotop, and htop.
|
||||||
|
//!
|
||||||
|
//! **Note:** The following documentation is primarily intended for people to refer to for development purposes rather
|
||||||
|
//! than the actual usage of the application. If you are instead looking for documentation regarding the *usage* of
|
||||||
|
//! bottom, refer to [here](https://clementtsang.github.io/bottom/stable/).
|
||||||
|
|
||||||
#![warn(rust_2018_idioms)]
|
#![warn(rust_2018_idioms)]
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
#[cfg(feature = "log")]
|
#[cfg(feature = "log")]
|
||||||
@ -273,7 +280,8 @@ pub fn cleanup_terminal(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Based on https://github.com/Rigellute/spotify-tui/blob/master/src/main.rs
|
/// A panic hook to properly restore the terminal in the case of a panic.
|
||||||
|
/// Based on [spotify-tui's implementation](https://github.com/Rigellute/spotify-tui/blob/master/src/main.rs).
|
||||||
pub fn panic_hook(panic_info: &PanicInfo<'_>) {
|
pub fn panic_hook(panic_info: &PanicInfo<'_>) {
|
||||||
let mut stdout = stdout();
|
let mut stdout = stdout();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user