-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
src/cargo.rs
Outdated
let (mut libs, mut bins): (Vec<_>, Vec<_>) = | ||
targets.into_iter().partition(|target| match target.kind { | ||
TargetKind::Library => true, | ||
TargetKind::Binary => false, | ||
}); | ||
|
||
if !libs.is_empty() { | ||
println!("Documenting the library."); | ||
ui.warn( | ||
"Found more than one target to document. Documenting the library.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be good to say which library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually disregard you can only have one library, but having the actual name would be useful
use serde_json; | ||
|
||
use error::*; | ||
use ui::Ui; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks great to me! one thought about levels, and that's it.
src/lib.rs
Outdated
@@ -56,14 +60,15 @@ impl Config { | |||
/// ## Arguments | |||
/// | |||
/// - `manifest_path`: The path to the `Cargo.toml` of the crate being documented | |||
pub fn new(manifest_path: PathBuf, assets: Vec<Asset>) -> Result<Config> { | |||
pub fn new(quiet: bool, manifest_path: PathBuf, assets: Vec<Asset>) -> Result<Config> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should be an enum of levels instead; quiet, verbose, and normal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. What if in the future we want -vvv
? Having an enum would make that easier and is more type safe. It'll express what it does better.
Comments addressed. |
Thanks! |
cc #128
Also lays the groundwork for
--verbose
once we figure out how we want it to work.