Skip to content

Commit

Permalink
Docs, rustfmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
virtualritz committed Nov 12, 2023
1 parent 38661d4 commit c2ae6aa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
11 changes: 6 additions & 5 deletions crates/nsi-core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.bytes()
.ok()?;
File::create(lib_path.clone())
.unwrap_or_else(|_| panic!("Could not create {}", lib_path.display()))
.unwrap_or_else(|_| {
panic!("Could not create {}", lib_path.display())
})
.write_all(&lib_data)
.unwrap_or_else(|_| panic!(
"Could not write to {}",
lib_path.display()
));
.unwrap_or_else(|_| {
panic!("Could not write to {}", lib_path.display())
});
Some(())
})();
}
Expand Down
1 change: 1 addition & 0 deletions crates/nsi-core/src/output/pixel_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl LayerDepth {
}
}

/// Returns `true`` if this layer contains an alpha channel.
pub fn has_alpha(&self) -> bool {
[
LayerDepth::OneChannelAndAlpha,
Expand Down
10 changes: 8 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@
//! ```
//! ## More Examples
//!
//! All the examples in this crate require a (free) [3Delight](https://www.3delight.com/)
//! installation to run.
//! These can be found in the [`examples`](https://github.com/virtualritz/nsi/tree/master/examples)
//! folder.
//!
//! *All the examples in this crate require a (free) [3Delight](https://www.3delight.com/)
//! installation to run!*
//!
//! ### Interactive
//!
Expand Down Expand Up @@ -125,6 +128,9 @@
//! (i.e. closures) during and/or after rendering via the [`output`] module.
//! This module is enabled through the feature of the same name (see below).
//!
//! It should be straightforward to create an `async` implementation with this
//! or use channels to stream pixels back to a main thread.
//!
//! ## Cargo Features
//!
//! * [`output`] -- Add support for streaming pixels from the renderer to the
Expand Down

0 comments on commit c2ae6aa

Please sign in to comment.