-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge pull request #45 from mathstuf/repository-info"
- Loading branch information
1 parent
54dfb52
commit 91411ad
Showing
2 changed files
with
2 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,6 @@ | |
//! | ||
//! - Homepage: https://github.com/yoshuawuyts/human-panic | ||
//! - Authors: Yoshua Wuyts <[email protected]> | ||
//! - Repository: https://github.com/yoshuawuyts/human-panic | ||
//! | ||
//! We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports. | ||
//! | ||
|
@@ -64,8 +63,6 @@ pub struct Metadata { | |
pub authors: Cow<'static, str>, | ||
/// The URL of the crate's website | ||
pub homepage: Cow<'static, str>, | ||
/// The URL of the crate's repository | ||
pub repository: Cow<'static, str>, | ||
} | ||
|
||
/// `human-panic` initialisation macro | ||
|
@@ -85,7 +82,6 @@ pub struct Metadata { | |
/// version: env!("CARGO_PKG_VERSION").into(), | ||
/// authors: "My Company Support <[email protected]>".into(), | ||
/// homepage: "support.mycompany.com".into(), | ||
/// repository: "https://git.mycompany.com/repo.git".into(), | ||
/// }); | ||
/// ``` | ||
#[macro_export] | ||
|
@@ -123,7 +119,6 @@ macro_rules! setup_panic { | |
name: env!("CARGO_PKG_NAME").into(), | ||
authors: env!("CARGO_PKG_AUTHORS").replace(":", ", ").into(), | ||
homepage: env!("CARGO_PKG_HOMEPAGE").into(), | ||
repository: option_env!("CARGO_PKG_REPOSITORY").unwrap_or("").into(), | ||
}; | ||
|
||
panic::set_hook(Box::new(move |info: &PanicInfo| { | ||
|
@@ -142,13 +137,8 @@ pub fn print_msg<P: AsRef<Path>>( | |
file_path: Option<P>, | ||
meta: &Metadata, | ||
) -> IoResult<()> { | ||
let (_version, name, authors, homepage, repository) = ( | ||
&meta.version, | ||
&meta.name, | ||
&meta.authors, | ||
&meta.homepage, | ||
&meta.repository, | ||
); | ||
let (_version, name, authors, homepage) = | ||
(&meta.version, &meta.name, &meta.authors, &meta.homepage); | ||
|
||
let stderr = BufferWriter::stderr(ColorChoice::Auto); | ||
let mut buffer = stderr.buffer(); | ||
|
@@ -179,9 +169,6 @@ pub fn print_msg<P: AsRef<Path>>( | |
if !authors.is_empty() { | ||
writeln!(&mut buffer, "- Authors: {}", authors)?; | ||
} | ||
if !repository.is_empty() { | ||
writeln!(&mut buffer, "- Repository: {}", repository)?; | ||
} | ||
writeln!( | ||
&mut buffer, | ||
"\nWe take privacy seriously, and do not perform any \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ fn main() { | |
version: env!("CARGO_PKG_VERSION").into(), | ||
authors: "My Company Support <[email protected]".into(), | ||
homepage: "support.mycompany.com".into(), | ||
repository: "https://git.mycompany.com/repo.git".into(), | ||
}); | ||
|
||
println!("A normal log message"); | ||
|