Skip to content

Commit

Permalink
fix: drop unnecessary and to-be-invalid #[doc] attributes
Browse files Browse the repository at this point in the history
This fixes a build failure under Windows. It seems the two options
will only work at the crate level in the future so the compiler warns
about them now, and will fail build later. In CI, warnings seem to
fail the build already.

rust-lang/rust#82730
https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level
  • Loading branch information
liwfi committed Aug 3, 2021
1 parent 7bde618 commit d559709
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions ipc/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
//! # }
//! ```

#![doc(html_favicon_url = "https://docs.sequoia-pgp.org/favicon.png")]
#![doc(html_logo_url = "https://docs.sequoia-pgp.org/logo.svg")]
#![warn(missing_docs)]


use std::io;
use std::path::{Path, PathBuf};

Expand Down Expand Up @@ -102,7 +99,7 @@ impl Context {
/// `.build()` in order to turn it into a Context.
pub fn configure() -> Config {
Config(Context {
home: PathBuf::from(""), // Defer computation of default.
home: PathBuf::from(""), // Defer computation of default.
lib: prefix().join("lib").join("sequoia"),
ipc_policy: IPCPolicy::Robust,
ephemeral: false,
Expand Down Expand Up @@ -183,10 +180,9 @@ impl Config {
c.cleanup = true;
} else {
if home_not_set {
c.home =
dirs::home_dir().ok_or_else(||
anyhow::anyhow!("Failed to get users home directory"))?
.join(".sequoia");
c.home = dirs::home_dir()
.ok_or_else(|| anyhow::anyhow!("Failed to get users home directory"))?
.join(".sequoia");
}
}
Ok(c)
Expand Down Expand Up @@ -250,7 +246,6 @@ pub enum Error {
IoError(#[from] io::Error),
}


/* IPC policy. */

/// IPC policy for Sequoia.
Expand Down Expand Up @@ -315,7 +310,6 @@ impl<'a> From<&'a IPCPolicy> for u8 {
}
}


// XXX: TryFrom would be nice.
impl From<u8> for IPCPolicy {
fn from(policy: u8) -> Self {
Expand Down

0 comments on commit d559709

Please sign in to comment.