Skip to content

Commit

Permalink
Fix cargo doc (#94)
Browse files Browse the repository at this point in the history
Hi there,

It looks like the mass-renaming campaign from the latest release missed
a few doc-specific includes and references, causing `docs.rs` and `cargo
doc` to fail.

This PR should get the documentation working again.
  • Loading branch information
inflation committed Oct 1, 2024
2 parents d964913 + 6dc2153 commit f8d36b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion jpegxl-rs/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub enum DecodeError {
UnknownStatus(JxlDecoderStatus),
}

/// Errors derived from [`JxlEncoderStatus`][jpegxl_sys::encode::JxlEncoderStatus]
/// Errors derived from [`JxlEncoderStatus`][jpegxl_sys::encoder::encode::JxlEncoderStatus]
/// and [`JxlEncoderError`]
#[derive(Error, Debug)]
pub enum EncodeError {
Expand Down
2 changes: 0 additions & 2 deletions jpegxl-rs/src/parallel/resizable_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ along with jpegxl-rs. If not, see <https://www.gnu.org/licenses/>.

//! Wrapper for resizable thread pool implementation with C++ standard library
#![cfg_attr(docsrs, doc(cfg(feature = "threads")))]

use std::{ffi::c_void, ptr::null_mut};

use jpegxl_sys::threads::resizable_parallel_runner as api;
Expand Down
8 changes: 4 additions & 4 deletions jpegxl-sys/src/encoder/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ use crate::{
};

#[cfg(doc)]
use crate::common::{
use crate::{
common::types::{JxlBitDepthType, JxlDataType},
encoder::stats::JxlEncoderStatsCreate,
types::{JxlBitDepthType, JxlDataType},
};

/// Opaque structure that holds the JPEG XL encoder.
Expand Down Expand Up @@ -1281,7 +1281,7 @@ extern "C" {
) -> JxlEncoderStatus;

/// Sets a frame-specific option of integer type to the encoder options.
/// The [`FrameSetting`] argument determines which option is set.
/// The [`JxlEncoderFrameSettingId`] argument determines which option is set.
///
/// # Parameters
/// - `frame_settings`: set of options and metadata for this frame. Also
Expand All @@ -1302,7 +1302,7 @@ extern "C" {
) -> JxlEncoderStatus;

/// Sets a frame-specific option of float type to the encoder options.
/// The [`FrameSetting`] argument determines which option is set.
/// The [`JxlEncoderFrameSettingId`] argument determines which option is set.
///
/// # Parameters
/// - `frame_settings`: set of options and metadata for this frame. Also
Expand Down

0 comments on commit f8d36b5

Please sign in to comment.