From 87029310b8e0513f854d83065312f3325c2a8a38 Mon Sep 17 00:00:00 2001 From: martin frances Date: Tue, 30 Jul 2024 11:54:08 +0100 Subject: [PATCH] Minor: 'cargo doc' reports links need to be wrapped in angle brackets. (#10320) --- ARCHITECTURE.md | 10 +++++----- README.md | 2 +- core/tauri-build/CHANGELOG.md | 2 +- core/tauri-build/src/static_vcruntime.rs | 2 +- core/tauri-macros/CHANGELOG.md | 2 +- core/tauri-utils/src/acl/identifier.rs | 2 +- core/tauri-utils/src/config.rs | 18 +++++++++--------- core/tauri-utils/src/html.rs | 2 +- core/tauri-utils/src/lib.rs | 2 +- core/tauri-utils/src/mime_type.rs | 2 +- core/tauri-utils/src/tokens.rs | 2 +- core/tauri/build.rs | 2 +- core/tauri/src/manager/mod.rs | 2 +- core/tauri/src/path/plugin.rs | 4 ++-- core/tauri/src/scope/fs.rs | 4 ++-- core/tauri/src/webview/mod.rs | 4 ++-- core/tauri/src/webview/webview_window.rs | 6 +++--- core/tests/restart/tests/restart.rs | 2 +- tooling/bundler/src/bundle/category.rs | 2 +- tooling/bundler/src/bundle/common.rs | 2 +- tooling/bundler/src/bundle/linux/debian.rs | 2 +- tooling/bundler/src/bundle/settings.rs | 20 ++++++++++---------- tooling/macos-sign/src/keychain.rs | 2 +- 23 files changed, 49 insertions(+), 49 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index bf4b5dd93e9f..fd904023dd53 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -1,8 +1,8 @@ # The Tauri Architecture -https://tauri.app + -https://github.com/tauri-apps/tauri + ## Introduction @@ -113,9 +113,9 @@ Generally speaking, plugins are authored by third parties (even though there may Here are several examples of Tauri Plugins: -- https://github.com/tauri-apps/tauri-plugin-sql -- https://github.com/tauri-apps/tauri-plugin-stronghold -- https://github.com/tauri-apps/tauri-plugin-authenticator +- +- +- # Workflows diff --git a/README.md b/README.md index 1c02b27accfd..b9424065b700 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Thank you to everyone contributing to Tauri! ### Documentation -Documentation in a polyglot system is a tricky proposition. To this end, we prefer to use inline documentation in the Rust & JS source code as much as possible. Check out the hosting repository for the documentation site for further information: https://github.com/tauri-apps/tauri-docs +Documentation in a polyglot system is a tricky proposition. To this end, we prefer to use inline documentation in the Rust & JS source code as much as possible. Check out the hosting repository for the documentation site for further information: ## Partners diff --git a/core/tauri-build/CHANGELOG.md b/core/tauri-build/CHANGELOG.md index 373c295572bd..7228821f3bf6 100644 --- a/core/tauri-build/CHANGELOG.md +++ b/core/tauri-build/CHANGELOG.md @@ -397,7 +397,7 @@ - [`52474e47`](https://www.github.com/tauri-apps/tauri/commit/52474e479d695865299d8c8d868fb98b99731020)([#7141](https://www.github.com/tauri-apps/tauri/pull/7141)) Enhance Cargo features check. - [`af937290`](https://www.github.com/tauri-apps/tauri/commit/af93729031565a69d1fde6cf16bea3b9b6e43a65)([#6676](https://www.github.com/tauri-apps/tauri/pull/6676)) On Windows, set `LegalCopyright` and `FileDescription` file properties on the executable from `tauri.bundle.copyright` and `tauri.bundle.shortDescription`, -- [`d2710e9d`](https://www.github.com/tauri-apps/tauri/commit/d2710e9d2e8fd93975ef6494512370faa8cb3b7e)([#6944](https://www.github.com/tauri-apps/tauri/pull/6944)) Unpin `time`, `ignore`, and `winnow` crate versions. Developers now have to pin crates if needed themselves. A list of crates that need pinning to adhere to Tauri's MSRV will be visible in Tauri's GitHub workflow: https://github.com/tauri-apps/tauri/blob/dev/.github/workflows/test-core.yml#L85. +- [`d2710e9d`](https://www.github.com/tauri-apps/tauri/commit/d2710e9d2e8fd93975ef6494512370faa8cb3b7e)([#6944](https://www.github.com/tauri-apps/tauri/pull/6944)) Unpin `time`, `ignore`, and `winnow` crate versions. Developers now have to pin crates if needed themselves. A list of crates that need pinning to adhere to Tauri's MSRV will be visible in Tauri's GitHub workflow: . ## \[1.3.0] diff --git a/core/tauri-build/src/static_vcruntime.rs b/core/tauri-build/src/static_vcruntime.rs index 833c7d227219..e5bc7429c0ae 100644 --- a/core/tauri-build/src/static_vcruntime.rs +++ b/core/tauri-build/src/static_vcruntime.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -// taken from https://github.com/ChrisDenton/static_vcruntime/ +// taken from // we're not using static_vcruntime directly because we want this for debug builds too use std::{env, fs, io::Write, path::Path}; diff --git a/core/tauri-macros/CHANGELOG.md b/core/tauri-macros/CHANGELOG.md index eae6abcf9dc4..c82433e8ced5 100644 --- a/core/tauri-macros/CHANGELOG.md +++ b/core/tauri-macros/CHANGELOG.md @@ -427,7 +427,7 @@ - `ring` -> `getrandom` -See https://github.com/tauri-apps/tauri/pull/3773 for more information about +See for more information about these specific choices. - [8661e3e2](https://www.github.com/tauri-apps/tauri/commit/8661e3e24d96c399bfbcdee5d8e9d6beba2265a7) replace dependencies with long build times when used together (closes [#3571](https://www.github.com/tauri-apps/tauri/pull/3571)) ([#3773](https://www.github.com/tauri-apps/tauri/pull/3773)) on 2022-03-27 diff --git a/core/tauri-utils/src/acl/identifier.rs b/core/tauri-utils/src/acl/identifier.rs index 1cecceb714fa..64df0ed274cc 100644 --- a/core/tauri-utils/src/acl/identifier.rs +++ b/core/tauri-utils/src/acl/identifier.rs @@ -12,7 +12,7 @@ const IDENTIFIER_SEPARATOR: u8 = b':'; const PLUGIN_PREFIX: &str = "tauri-plugin-"; const CORE_PLUGIN_IDENTIFIER_PREFIX: &str = "core:"; -// https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field +// const MAX_LEN_PREFIX: usize = 64 - PLUGIN_PREFIX.len(); const MAX_LEN_BASE: usize = 64; const MAX_LEN_IDENTIFIER: usize = MAX_LEN_PREFIX + 1 + MAX_LEN_BASE; diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index eab684af0ab3..8e135662e559 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -333,7 +333,7 @@ pub struct DebConfig { /// Recognized Priorities as of now are : `required`, `important`, `standard`, `optional`, `extra` pub priority: Option, /// Path of the uncompressed Changelog file, to be stored at /usr/share/doc/package-name/changelog.gz. See - /// https://www.debian.org/doc/debian-policy/ch-docs.html#changelog-files-and-release-notes + /// pub changelog: Option, /// Path to a custom desktop file Handlebars template. /// @@ -341,19 +341,19 @@ pub struct DebConfig { #[serde(alias = "desktop-template")] pub desktop_template: Option, /// Path to script that will be executed before the package is unpacked. See - /// https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html + /// #[serde(alias = "pre-install-script")] pub pre_install_script: Option, /// Path to script that will be executed after the package is unpacked. See - /// https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html + /// #[serde(alias = "post-install-script")] pub post_install_script: Option, /// Path to script that will be executed before the package is removed. See - /// https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html + /// #[serde(alias = "pre-remove-script")] pub pre_remove_script: Option, /// Path to script that will be executed after the package is removed. See - /// https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html + /// #[serde(alias = "post-remove-script")] pub post_remove_script: Option, } @@ -408,19 +408,19 @@ pub struct RpmConfig { #[serde(alias = "desktop-template")] pub desktop_template: Option, /// Path to script that will be executed before the package is unpacked. See - /// http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html + /// #[serde(alias = "pre-install-script")] pub pre_install_script: Option, /// Path to script that will be executed after the package is unpacked. See - /// http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html + /// #[serde(alias = "post-install-script")] pub post_install_script: Option, /// Path to script that will be executed before the package is removed. See - /// http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html + /// #[serde(alias = "pre-remove-script")] pub pre_remove_script: Option, /// Path to script that will be executed after the package is removed. See - /// http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html + /// #[serde(alias = "post-remove-script")] pub post_remove_script: Option, } diff --git a/core/tauri-utils/src/html.rs b/core/tauri-utils/src/html.rs index 97c83e2a35e3..a42f4e8c4fc5 100644 --- a/core/tauri-utils/src/html.rs +++ b/core/tauri-utils/src/html.rs @@ -28,7 +28,7 @@ pub const SCRIPT_NONCE_TOKEN: &str = "__TAURI_SCRIPT_NONCE__"; /// The token used for style nonces. pub const STYLE_NONCE_TOKEN: &str = "__TAURI_STYLE_NONCE__"; -// taken from https://github.com/kuchiki-rs/kuchiki/blob/57ee6920d835315a498e748ba4b07a851ae5e498/src/serializer.rs#L12 +// taken from fn serialize_node_ref_internal( node: &NodeRef, serializer: &mut S, diff --git a/core/tauri-utils/src/lib.rs b/core/tauri-utils/src/lib.rs index c8e363391c89..04d273354cfe 100644 --- a/core/tauri-utils/src/lib.rs +++ b/core/tauri-utils/src/lib.rs @@ -294,7 +294,7 @@ impl Default for Env { if env.appimage.is_some() || env.appdir.is_some() { // validate that we're actually running on an AppImage // an AppImage is mounted to `/$TEMPDIR/.mount_${appPrefix}${hash}` - // see https://github.com/AppImage/AppImageKit/blob/1681fd84dbe09c7d9b22e13cdb16ea601aa0ec47/src/runtime.c#L501 + // see // note that it is safe to use `std::env::current_exe` here since we just loaded an AppImage. let is_temp = std::env::current_exe() .map(|p| { diff --git a/core/tauri-utils/src/mime_type.rs b/core/tauri-utils/src/mime_type.rs index e78cdd90da52..61b64147d1e0 100644 --- a/core/tauri-utils/src/mime_type.rs +++ b/core/tauri-utils/src/mime_type.rs @@ -71,7 +71,7 @@ impl MimeType { // Assume HTML when a TLD is found for eg. `wry:://tauri.app` | `wry://hello.com` Some(_) => fallback, // using octet stream according to this: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types + // None => Self::OctetStream, } } diff --git a/core/tauri-utils/src/tokens.rs b/core/tauri-utils/src/tokens.rs index 238d8df2f3b7..c02fb1fdc0bd 100644 --- a/core/tauri-utils/src/tokens.rs +++ b/core/tauri-utils/src/tokens.rs @@ -131,7 +131,7 @@ where /// Create a `serde_json::Value` variant `TokenStream` for a number pub fn json_value_number_lit(num: &serde_json::Number) -> TokenStream { - // See https://docs.rs/serde_json/1/serde_json/struct.Number.html for guarantees + // See for guarantees let prefix = quote! { ::serde_json::Value }; if num.is_u64() { // guaranteed u64 diff --git a/core/tauri/build.rs b/core/tauri/build.rs index a91c576596b7..8169f2f6875d 100644 --- a/core/tauri/build.rs +++ b/core/tauri/build.rs @@ -210,7 +210,7 @@ fn has_feature(feature: &str) -> bool { .push(feature.to_string()); // when a feature is enabled, Cargo sets the `CARGO_FEATURE_` env var to 1 - // https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts + // std::env::var(format!("CARGO_FEATURE_{}", AsShoutySnakeCase(feature))) .map(|x| x == "1") .unwrap_or(false) diff --git a/core/tauri/src/manager/mod.rs b/core/tauri/src/manager/mod.rs index f75eea079297..fab7fe3608a2 100644 --- a/core/tauri/src/manager/mod.rs +++ b/core/tauri/src/manager/mod.rs @@ -102,7 +102,7 @@ pub(crate) fn set_csp( csp } -// inspired by https://github.com/rust-lang/rust/blob/1be5c8f90912c446ecbdc405cbc4a89f9acd20fd/library/alloc/src/str.rs#L260-L297 +// inspired by fn replace_with_callback String>( original: &str, pattern: &str, diff --git a/core/tauri/src/path/plugin.rs b/core/tauri/src/path/plugin.rs index fded281d9ab2..834393505ec7 100644 --- a/core/tauri/src/path/plugin.rs +++ b/core/tauri/src/path/plugin.rs @@ -14,7 +14,7 @@ use crate::{ }; /// Normalize a path, removing things like `.` and `..`, this snippet is taken from cargo's paths util. -/// https://github.com/rust-lang/cargo/blob/46fa867ff7043e3a0545bf3def7be904e1497afd/crates/cargo-util/src/paths.rs#L73-L106 +/// fn normalize_path(path: &Path) -> PathBuf { let mut components = path.components().peekable(); let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().cloned() { @@ -44,7 +44,7 @@ fn normalize_path(path: &Path) -> PathBuf { /// Normalize a path, removing things like `.` and `..`, this snippet is taken from cargo's paths util but /// slightly modified to not resolve absolute paths. -/// https://github.com/rust-lang/cargo/blob/46fa867ff7043e3a0545bf3def7be904e1497afd/crates/cargo-util/src/paths.rs#L73-L106 +/// fn normalize_path_no_absolute(path: &Path) -> PathBuf { let mut components = path.components().peekable(); let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().cloned() { diff --git a/core/tauri/src/scope/fs.rs b/core/tauri/src/scope/fs.rs index 35930a5a0993..e0123512996a 100644 --- a/core/tauri/src/scope/fs.rs +++ b/core/tauri/src/scope/fs.rs @@ -171,7 +171,7 @@ impl Scope { next_event_id: Default::default(), match_options: glob::MatchOptions { // this is needed so `/dir/*` doesn't match files within subdirectories such as `/dir/subdir/file.txt` - // see: https://github.com/tauri-apps/tauri/security/advisories/GHSA-6mv3-wm7j-h4w5 + // see: require_literal_separator: true, require_literal_leading_dot, ..Default::default() @@ -362,7 +362,7 @@ mod tests { next_event_id: Default::default(), match_options: glob::MatchOptions { // this is needed so `/dir/*` doesn't match files within subdirectories such as `/dir/subdir/file.txt` - // see: https://github.com/tauri-apps/tauri/security/advisories/GHSA-6mv3-wm7j-h4w5 + // see: require_literal_separator: true, // dotfiles are not supposed to be exposed by default on unix #[cfg(unix)] diff --git a/core/tauri/src/webview/mod.rs b/core/tauri/src/webview/mod.rs index 599ac91fdca8..f2de4f169173 100644 --- a/core/tauri/src/webview/mod.rs +++ b/core/tauri/src/webview/mod.rs @@ -1028,8 +1028,8 @@ fn main() { main_webview.with_webview(|webview| { #[cfg(target_os = "linux")] { - // see https://docs.rs/webkit2gtk/2.0.0/webkit2gtk/struct.WebView.html - // and https://docs.rs/webkit2gtk/2.0.0/webkit2gtk/trait.WebViewExt.html + // see + // and use webkit2gtk::WebViewExt; webview.inner().set_zoom_level(4.); } diff --git a/core/tauri/src/webview/webview_window.rs b/core/tauri/src/webview/webview_window.rs index aea006f096f3..130724079962 100644 --- a/core/tauri/src/webview/webview_window.rs +++ b/core/tauri/src/webview/webview_window.rs @@ -1609,15 +1609,15 @@ impl WebviewWindow { /// main_webview.with_webview(|webview| { /// #[cfg(target_os = "linux")] /// { - /// // see https://docs.rs/webkit2gtk/2.0.0/webkit2gtk/struct.WebView.html - /// // and https://docs.rs/webkit2gtk/2.0.0/webkit2gtk/trait.WebViewExt.html + /// // see + /// // and /// use webkit2gtk::WebViewExt; /// webview.inner().set_zoom_level(4.); /// } /// /// #[cfg(windows)] /// unsafe { - /// // see https://docs.rs/webview2-com/0.19.1/webview2_com/Microsoft/Web/WebView2/Win32/struct.ICoreWebView2Controller.html + /// // see /// webview.controller().SetZoomFactor(4.).unwrap(); /// } /// diff --git a/core/tests/restart/tests/restart.rs b/core/tests/restart/tests/restart.rs index 94ff2c8b325f..89bfdd01b8d3 100644 --- a/core/tests/restart/tests/restart.rs +++ b/core/tests/restart/tests/restart.rs @@ -9,7 +9,7 @@ use std::process::Command; /// Helper for generic catch-all errors. type Result = std::result::Result<(), Box>; -/// https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--1300-1699- +/// #[cfg(windows)] const ERROR_PRIVILEGE_NOT_HELD: i32 = 1314; diff --git a/tooling/bundler/src/bundle/category.rs b/tooling/bundler/src/bundle/category.rs index 28384734bbe4..747e252bff4a 100644 --- a/tooling/bundler/src/bundle/category.rs +++ b/tooling/bundler/src/bundle/category.rs @@ -145,7 +145,7 @@ impl AppCategory { /// Map an AppCategory to the closest set of Freedesktop registered /// categories that matches that category. /// - /// Cf https://specifications.freedesktop.org/menu-spec/latest/ + /// Cf pub fn freedesktop_categories(self) -> &'static str { match &self { AppCategory::Business => "Office;", diff --git a/tooling/bundler/src/bundle/common.rs b/tooling/bundler/src/bundle/common.rs index 37aa4dd9a878..cde3e7dfe596 100644 --- a/tooling/bundler/src/bundle/common.rs +++ b/tooling/bundler/src/bundle/common.rs @@ -15,7 +15,7 @@ use std::{ /// Returns true if the path has a filename indicating that it is a high-density /// "retina" icon. Specifically, returns true the file stem ends with /// "@2x" (a convention specified by the [Apple developer docs]( -/// https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html)). +/// )). #[allow(dead_code)] pub fn is_retina>(path: P) -> bool { path diff --git a/tooling/bundler/src/bundle/linux/debian.rs b/tooling/bundler/src/bundle/linux/debian.rs index 95e9eb30c931..4af355e9dbd0 100644 --- a/tooling/bundler/src/bundle/linux/debian.rs +++ b/tooling/bundler/src/bundle/linux/debian.rs @@ -129,7 +129,7 @@ pub fn generate_data( } /// Generate the Changelog file by compressing, to be stored at /usr/share/doc/package-name/changelog.gz. See -/// https://www.debian.org/doc/debian-policy/ch-docs.html#changelog-files-and-release-notes +/// fn generate_changelog_file(settings: &Settings, data_dir: &Path) -> crate::Result<()> { if let Some(changelog_src_path) = &settings.deb().changelog { let mut src_file = File::open(changelog_src_path)?; diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index 74a6b9ec1d46..0f910a1ea875 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -187,25 +187,25 @@ pub struct DebianSettings { #[doc = include_str!("./linux/templates/main.desktop")] /// ``` pub desktop_template: Option, - /// Define the section in Debian Control file. See : https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections + /// Define the section in Debian Control file. See : pub section: Option, /// Change the priority of the Debian Package. By default, it is set to `optional`. /// Recognized Priorities as of now are : `required`, `important`, `standard`, `optional`, `extra` pub priority: Option, /// Path of the uncompressed Changelog file, to be stored at /usr/share/doc/package-name/changelog.gz. See - /// https://www.debian.org/doc/debian-policy/ch-docs.html#changelog-files-and-release-notes + /// pub changelog: Option, /// Path to script that will be executed before the package is unpacked. See - /// https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html + /// pub pre_install_script: Option, /// Path to script that will be executed after the package is unpacked. See - /// https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html + /// pub post_install_script: Option, /// Path to script that will be executed before the package is removed. See - /// https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html + /// pub pre_remove_script: Option, /// Path to script that will be executed after the package is removed. See - /// https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html + /// pub post_remove_script: Option, } @@ -246,16 +246,16 @@ pub struct RpmSettings { /// ``` pub desktop_template: Option, /// Path to script that will be executed before the package is unpacked. See - /// http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html + /// pub pre_install_script: Option, /// Path to script that will be executed after the package is unpacked. See - /// http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html + /// pub post_install_script: Option, /// Path to script that will be executed before the package is removed. See - /// http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html + /// pub pre_remove_script: Option, /// Path to script that will be executed after the package is removed. See - /// http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html + /// pub post_remove_script: Option, } diff --git a/tooling/macos-sign/src/keychain.rs b/tooling/macos-sign/src/keychain.rs index bb079fd848df..073f10076811 100644 --- a/tooling/macos-sign/src/keychain.rs +++ b/tooling/macos-sign/src/keychain.rs @@ -52,7 +52,7 @@ impl Keychain { /// By example you can use; openssl base64 -in MyCertificate.p12 -out MyCertificate-base64.txt /// Then use the value of the base64 as `certificate_encoded`. /// You need to set certificate_password to the password you set when you exported your certificate. - /// https://help.apple.com/xcode/mac/current/#/dev154b28f09 see: `Export a signing certificate` + /// see: `Export a signing certificate` pub fn with_certificate( certificate_encoded: &OsString, certificate_password: &OsString,