Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(doc): Properly replace dox feature with docrs #155

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/doc-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"webkit2gtk-sys": patch
"webkit2gtk-rs": patch
---

Properly replaced dox with docrs.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ rustdoc-args = [ "--cfg", "docsrs" ]
name = "webkit2gtk"

[features]
dox = [ "ffi/dox", "java_script_core/dox" ]
v2_2 = [ ]
v2_4 = [ "v2_2" ]
v2_6 = [ "v2_4", "ffi/v2_6" ]
Expand Down
44 changes: 22 additions & 22 deletions src/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
// from gir-files (https://github.com/vhdirk/gir-files.git)
// DO NOT EDIT

#[cfg(any(feature = "v2_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_2")))]
#[cfg(any(feature = "v2_2", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_2")))]
use crate::CredentialPersistence;
#[cfg(any(feature = "v2_34", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_34")))]
#[cfg(any(feature = "v2_34", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_34")))]
use glib::object::IsA;
use glib::translate::mut_override;
#[cfg(any(feature = "v2_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_2")))]
#[cfg(any(feature = "v2_2", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_2")))]
use glib::translate::*;

glib::wrapper! {
Expand All @@ -25,8 +25,8 @@ glib::wrapper! {
}

impl Credential {
#[cfg(any(feature = "v2_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_2")))]
#[cfg(any(feature = "v2_2", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_2")))]
#[doc(alias = "webkit_credential_new")]
pub fn new(username: &str, password: &str, persistence: CredentialPersistence) -> Credential {
assert_initialized_main_thread!();
Expand All @@ -39,8 +39,8 @@ impl Credential {
}
}

#[cfg(any(feature = "v2_34", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_34")))]
#[cfg(any(feature = "v2_34", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_34")))]
#[doc(alias = "webkit_credential_new_for_certificate")]
#[doc(alias = "new_for_certificate")]
pub fn for_certificate(
Expand All @@ -56,8 +56,8 @@ impl Credential {
}
}

#[cfg(any(feature = "v2_34", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_34")))]
#[cfg(any(feature = "v2_34", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_34")))]
#[doc(alias = "webkit_credential_new_for_certificate_pin")]
#[doc(alias = "new_for_certificate_pin")]
pub fn for_certificate_pin(pin: &str, persistence: CredentialPersistence) -> Credential {
Expand All @@ -70,8 +70,8 @@ impl Credential {
}
}

#[cfg(any(feature = "v2_34", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_34")))]
#[cfg(any(feature = "v2_34", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_34")))]
#[doc(alias = "webkit_credential_get_certificate")]
#[doc(alias = "get_certificate")]
pub fn certificate(&mut self) -> Option<gio::TlsCertificate> {
Expand All @@ -82,8 +82,8 @@ impl Credential {
}
}

#[cfg(any(feature = "v2_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_2")))]
#[cfg(any(feature = "v2_2", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_2")))]
#[doc(alias = "webkit_credential_get_password")]
#[doc(alias = "get_password")]
pub fn password(&mut self) -> Option<glib::GString> {
Expand All @@ -94,8 +94,8 @@ impl Credential {
}
}

#[cfg(any(feature = "v2_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_2")))]
#[cfg(any(feature = "v2_2", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_2")))]
#[doc(alias = "webkit_credential_get_persistence")]
#[doc(alias = "get_persistence")]
pub fn persistence(&mut self) -> CredentialPersistence {
Expand All @@ -106,8 +106,8 @@ impl Credential {
}
}

#[cfg(any(feature = "v2_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_2")))]
#[cfg(any(feature = "v2_2", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_2")))]
#[doc(alias = "webkit_credential_get_username")]
#[doc(alias = "get_username")]
pub fn username(&mut self) -> Option<glib::GString> {
Expand All @@ -118,8 +118,8 @@ impl Credential {
}
}

#[cfg(any(feature = "v2_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_2")))]
#[cfg(any(feature = "v2_2", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_2")))]
#[doc(alias = "webkit_credential_has_password")]
pub fn has_password(&mut self) -> bool {
unsafe {
Expand Down
4 changes: 2 additions & 2 deletions src/javascript_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ impl JavascriptResult {
}
}

#[cfg(any(feature = "v2_22", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_22")))]
#[cfg(any(feature = "v2_22", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_22")))]
#[doc(alias = "webkit_javascript_result_get_js_value")]
#[doc(alias = "get_js_value")]
pub fn js_value(&self) -> Option<javascriptcore::Value> {
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(deprecated)]
#![doc = include_str!("../README.md")]
#![cfg_attr(feature = "dox", feature(doc_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]

pub use ffi;

Expand All @@ -22,17 +22,17 @@ mod auto;
// mod web_context;
mod web_view;

#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
mod website_data_manager;

// pub use credential::*;
// pub use javascript_result::*;
// pub use web_context::*;
pub use web_view::*;

#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
pub use website_data_manager::*;

pub use crate::auto::builders::*;
Expand Down
8 changes: 4 additions & 4 deletions src/web_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use glib::IsA;
use super::WebContext;

pub trait WebContextExtManual {
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_web_context_set_network_proxy_settings")]
fn set_network_proxy_settings(
&self,
Expand All @@ -23,8 +23,8 @@ impl<O> WebContextExtManual for O
where
O: IsA<WebContext>,
{
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
fn set_network_proxy_settings(
&self,
proxy_mode: NetworkProxyMode,
Expand Down
28 changes: 14 additions & 14 deletions src/website_data_manager.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
use crate::WebsiteData;
use crate::WebsiteDataManager;
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
use crate::WebsiteDataTypes;
use glib::{object::IsA, translate::*};
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
use std::boxed::Box as Box_;
use std::ptr;

pub trait WebsiteDataManagerExtManual: 'static {
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_website_data_manager_clear")]
fn clear<P: FnOnce(Result<(), glib::Error>) + Send + 'static>(
&self,
Expand All @@ -23,8 +23,8 @@ pub trait WebsiteDataManagerExtManual: 'static {
callback: P,
);

#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_website_data_manager_remove")]
fn remove<P: FnOnce(Result<(), glib::Error>) + Send + 'static>(
&self,
Expand All @@ -36,8 +36,8 @@ pub trait WebsiteDataManagerExtManual: 'static {
}

impl<O: IsA<WebsiteDataManager>> WebsiteDataManagerExtManual for O {
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
fn clear<P: FnOnce(Result<(), glib::Error>) + Send + 'static>(
&self,
types: WebsiteDataTypes,
Expand Down Expand Up @@ -75,8 +75,8 @@ impl<O: IsA<WebsiteDataManager>> WebsiteDataManagerExtManual for O {
}
}

#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[cfg(any(feature = "v2_16", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
fn remove<P: FnOnce(Result<(), glib::Error>) + Send + 'static>(
&self,
types: WebsiteDataTypes,
Expand Down
Loading
Loading