From 276818aac638c2aa5acb63ab95c80ae81c256a72 Mon Sep 17 00:00:00 2001 From: DK Liao Date: Wed, 25 Oct 2023 20:31:18 +0800 Subject: [PATCH] Replaced all dox --- src/lib.rs | 2 +- src/value.rs | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ec2f084..9e25811 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ // // Copyright 2013-2017, The Gtk-rs Project Developers. // // See the COPYRIGHT file at the top-level directory of this distribution. // // Licensed under the MIT license, see the LICENSE file or -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] mod auto; pub use auto::{traits::*, *}; diff --git a/src/value.rs b/src/value.rs index a132b4d..3999480 100644 --- a/src/value.rs +++ b/src/value.rs @@ -8,8 +8,8 @@ use std::ffi::c_void; use std::slice; impl Value { - #[cfg(any(feature = "v2_38", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))] + #[cfg(any(feature = "v2_38", docrs))] + #[cfg_attr(docrs, doc(cfg(feature = "v2_38")))] #[doc(alias = "jsc_value_new_array_buffer")] pub fn new_array_buffer(context: &impl IsA, data: glib::Bytes) -> Option { let len = data.len(); @@ -33,20 +33,20 @@ impl Value { } pub trait ValueExtManual: 'static { - #[cfg(any(feature = "v2_38", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))] + #[cfg(any(feature = "v2_38", docrs))] + #[cfg_attr(docrs, doc(cfg(feature = "v2_38")))] #[doc(alias = "jsc_value_array_buffer_get_data")] fn array_buffer_get_data(&self) -> &[u8]; - #[cfg(any(feature = "v2_38", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))] + #[cfg(any(feature = "v2_38", docrs))] + #[cfg_attr(docrs, doc(cfg(feature = "v2_38")))] #[doc(alias = "jsc_value_typed_array_get_data")] fn typed_array_get_data(&self) -> TypedArrayData; } impl> ValueExtManual for O { - #[cfg(any(feature = "v2_38", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))] + #[cfg(any(feature = "v2_38", docrs))] + #[cfg_attr(docrs, doc(cfg(feature = "v2_38")))] fn array_buffer_get_data(&self) -> &[u8] { unsafe { let mut len = 0; @@ -59,8 +59,8 @@ impl> ValueExtManual for O { } } - #[cfg(any(feature = "v2_38", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))] + #[cfg(any(feature = "v2_38", docrs))] + #[cfg_attr(docrs, doc(cfg(feature = "v2_38")))] fn typed_array_get_data(&self) -> TypedArrayData { use crate::TypedArrayType::*; unsafe { @@ -91,8 +91,8 @@ impl> ValueExtManual for O { } } -#[cfg(any(feature = "v2_38", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_38")))] +#[cfg(any(feature = "v2_38", docrs))] +#[cfg_attr(docrs, doc(cfg(feature = "v2_38")))] #[derive(Debug, Clone, Copy)] #[non_exhaustive] pub enum TypedArrayData<'a> {