ソースを参照

fix(core): updater documentation not showing on docs.rs (#4190)

Lucas Fernandes Nogueira 3 年 前
コミット
55892c35f5

+ 5 - 0
.changes/fix-updater-docs.md

@@ -0,0 +1,5 @@
+---
+"tauri": patch
+---
+
+Fixes updater documentation not showing on docs.rs.

+ 2 - 4
core/tauri/Cargo.toml

@@ -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",
@@ -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 = [

+ 1 - 4
core/tauri/build.rs

@@ -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);

+ 1 - 1
core/tauri/src/api/error.rs

@@ -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.

+ 2 - 2
core/tauri/src/api/file.rs

@@ -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;
 
@@ -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::*;
 

+ 1 - 1
core/tauri/src/app.rs

@@ -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;"#
       )]
       ///     });