Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dklassic committed Oct 25, 2023
1 parent ff8bc36 commit 1c749c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .changes/dox-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"javascriptcore-rs": patch
---

Properly replace dox with docrs to fix docs.rs building.
Properly replace dox with docsrs to fix docs.rs building.
24 changes: 12 additions & 12 deletions src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use std::ffi::c_void;
use std::slice;

impl Value {
#[cfg(any(feature = "v2_38", docrs))]
#[cfg_attr(docrs, doc(cfg(feature = "v2_38")))]
#[cfg(any(feature = "v2_38", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
#[doc(alias = "jsc_value_new_array_buffer")]
pub fn new_array_buffer(context: &impl IsA<Context>, data: glib::Bytes) -> Option<Value> {
let len = data.len();
Expand All @@ -33,20 +33,20 @@ impl Value {
}

pub trait ValueExtManual: 'static {
#[cfg(any(feature = "v2_38", docrs))]
#[cfg_attr(docrs, doc(cfg(feature = "v2_38")))]
#[cfg(any(feature = "v2_38", docsrs))]
#[cfg_attr(docsrs, 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", docrs))]
#[cfg_attr(docrs, doc(cfg(feature = "v2_38")))]
#[cfg(any(feature = "v2_38", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
#[doc(alias = "jsc_value_typed_array_get_data")]
fn typed_array_get_data(&self) -> TypedArrayData;
}

impl<O: IsA<Value>> ValueExtManual for O {
#[cfg(any(feature = "v2_38", docrs))]
#[cfg_attr(docrs, doc(cfg(feature = "v2_38")))]
#[cfg(any(feature = "v2_38", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
fn array_buffer_get_data(&self) -> &[u8] {
unsafe {
let mut len = 0;
Expand All @@ -59,8 +59,8 @@ impl<O: IsA<Value>> ValueExtManual for O {
}
}

#[cfg(any(feature = "v2_38", docrs))]
#[cfg_attr(docrs, doc(cfg(feature = "v2_38")))]
#[cfg(any(feature = "v2_38", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
fn typed_array_get_data(&self) -> TypedArrayData {
use crate::TypedArrayType::*;
unsafe {
Expand Down Expand Up @@ -91,8 +91,8 @@ impl<O: IsA<Value>> ValueExtManual for O {
}
}

#[cfg(any(feature = "v2_38", docrs))]
#[cfg_attr(docrs, doc(cfg(feature = "v2_38")))]
#[cfg(any(feature = "v2_38", docsrs))]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
#[derive(Debug, Clone, Copy)]
#[non_exhaustive]
pub enum TypedArrayData<'a> {
Expand Down

0 comments on commit 1c749c5

Please sign in to comment.