Skip to content

Commit

Permalink
fix(core): updater documentation not showing on docs.rs (#4190)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 22, 2022
1 parent eedadd3 commit 55892c3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-updater-docs.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Fixes updater documentation not showing on docs.rs.
6 changes: 2 additions & 4 deletions core/tauri/Cargo.toml
Expand Up @@ -25,8 +25,8 @@ features = [
"custom-protocol",
"api-all",
"cli",
"__updater-docs",
"__fs-extract-api-docs",
"updater",
"fs-extract-api",
"system-tray",
"devtools",
"http-multipart",
Expand Down Expand Up @@ -143,12 +143,10 @@ updater = [
"dialog-ask",
"fs-extract-api"
]
__updater-docs = [ "minisign-verify", "base64", "http-api", "dialog-ask" ]
http-api = [ "attohttpc" ]
http-multipart = [ "attohttpc/multipart-form", "reqwest/multipart" ]
shell-open-api = [ "open", "regex", "tauri-macros/shell-scope" ]
fs-extract-api = [ "zip" ]
__fs-extract-api-docs = [ ]
reqwest-client = [ "reqwest", "bytes" ]
process-command-api = [ "shared_child", "os_pipe" ]
global-shortcut = [
Expand Down
5 changes: 1 addition & 4 deletions core/tauri/build.rs
Expand Up @@ -38,10 +38,7 @@ fn alias(alias: &str, has_feature: bool) {
fn main() {
alias("custom_protocol", has_feature("custom-protocol"));
alias("dev", !has_feature("custom-protocol"));
alias(
"updater",
has_feature("updater") || has_feature("__updater-docs"),
);
alias("updater", has_feature("updater"));

let api_all = has_feature("api-all");
alias("api_all", api_all);
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/api/error.rs
Expand Up @@ -67,7 +67,7 @@ pub enum Error {
#[error(transparent)]
Zip(#[from] zip::result::ZipError),
/// Extract error.
#[cfg(any(feature = "fs-extract-api", feature = "__fs-extract-api-docs"))]
#[cfg(feature = "fs-extract-api")]
#[error("Failed to extract: {0}")]
Extract(String),
/// Notification error.
Expand Down
4 changes: 2 additions & 2 deletions core/tauri/src/api/file.rs
Expand Up @@ -4,7 +4,7 @@

//! Types and functions related to file operations.

#[cfg(any(feature = "fs-extract-api", feature = "__fs-extract-api-docs"))]
#[cfg(feature = "fs-extract-api")]
mod extract;
mod file_move;

Expand All @@ -13,7 +13,7 @@ use std::{
path::{Display, Path},
};

#[cfg(any(feature = "fs-extract-api", feature = "__fs-extract-api-docs"))]
#[cfg(feature = "fs-extract-api")]
pub use extract::*;
pub use file_move::*;

Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/app.rs
Expand Up @@ -537,7 +537,7 @@ macro_rules! shared_app_impl {
/// let handle = app.handle();
/// tauri::async_runtime::spawn(async move {
#[cfg_attr(
any(feature = "updater", feature = "__updater-docs"),
feature = "updater",
doc = r#" let response = handle.updater().check().await;"#
)]
/// });
Expand Down

0 comments on commit 55892c3

Please sign in to comment.