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

Re-exports crates for which local traits are implemented #54

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions src/core/rw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ mod error {

{
use std::error::Error;
assert!(matches!(err.source(), None));
assert!(err.source().is_none());
}

assert_eq!(
Expand Down Expand Up @@ -403,7 +403,7 @@ mod enlarge_error {
let err = EnlargeError::from(try_reserve_error);

use std::error::Error;
assert!(matches!(err.source(), None));
assert!(err.source().is_none());

assert_eq!(format!("{}", err.clone()), "could not enlarge buffer");

Expand Down
36 changes: 36 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,42 @@ mod types;

mod impls;

#[cfg(feature = "archery")]
pub use archery;
#[cfg(feature = "static-rc")]
pub use static_rc;

#[cfg(feature = "cgmath")]
pub use cgmath;
#[cfg(feature = "glam")]
pub use glam;
#[cfg(feature = "mint")]
pub use mint;
#[cfg(feature = "nalgebra")]
pub use nalgebra;
#[cfg(feature = "ultraviolet")]
pub use ultraviolet;
#[cfg(feature = "vek")]
pub use vek;

#[cfg(feature = "arrayvec")]
pub use arrayvec;
#[cfg(feature = "ndarray")]
pub use ndarray;
#[cfg(feature = "smallvec")]
pub use smallvec;
#[cfg(feature = "tinyvec")]
pub use tinyvec;

#[cfg(feature = "im")]
pub use im;
#[cfg(feature = "im-rc")]
pub use im_rc;
#[cfg(feature = "imbl")]
pub use imbl;
#[cfg(all(feature = "rpds", feature = "archery"))]
pub use rpds;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like these should all be wrapped in a pub mod reexports or they will be in the root. Actually it might not be that bad since most people will only enable one or a few of these anyway.

Thoughts?

pub use crate::core::{
CalculateSizeFor, DynamicStorageBuffer, DynamicUniformBuffer, ShaderSize, ShaderType,
StorageBuffer, UniformBuffer,
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ mod byte_vec_ext {
fn try_extend_zeroed_err() {
let mut vec = vec![0; 12];

assert!(matches!(vec.try_extend_zeroed(usize::MAX), Err(_)));
assert!(vec.try_extend_zeroed(usize::MAX).is_err());
}
}

Expand Down