Skip to content

Commit ae86e25

Browse files
chore: merge branch feat/conv into feat/packfiledir
2 parents 0b19dd0 + e5e53a8 commit ae86e25

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

ashen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ paste = "1.0.14"
1717
version = "0.24.8"
1818
optional = true
1919
default-features = false
20-
features = ["png"]
20+
features = ["png", "gif"]
2121

2222
[dev-dependencies]
2323
assert_approx_eq = "1.1.0"

ashen/src/asset/model/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ use dat::{
88
};
99

1010
use super::{
11+
Parser,
12+
color_map::Color,
1113
texture::{Texture, TextureSize},
12-
Color, Parser,
1314
};
1415
use crate::utils::{format::ModelPythonFile, nom::*};
1516

@@ -85,7 +86,7 @@ mod tests {
8586

8687
use super::Model;
8788
use crate::{
88-
asset::{color_map::ColorMap, Parser},
89+
asset::{Parser, color_map::ColorMap},
8990
utils::{format::ModelPythonFile, test::*},
9091
};
9192

ashen/src/utils/format.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
#[cfg(any(test, feature = "conv"))]
12
use std::ops::Deref;
23

4+
#[cfg(any(test, feature = "conv"))]
35
use image::{
46
Frame, ImageEncoder, RgbaImage,
57
codecs::{
@@ -15,11 +17,13 @@ use crate::asset::{
1517
sound::sample::{AudioBuffer, AudioSamplePoint},
1618
};
1719

20+
#[cfg(any(test, feature = "conv"))]
1821
pub trait PngFile {
1922
fn to_png(&self) -> Vec<u8>;
2023
}
2124

2225
// impl for any 2D array like data structure.
26+
#[cfg(any(test, feature = "conv"))]
2327
impl<Outer: ?Sized, Inner> PngFile for Outer
2428
where
2529
Outer: Deref<Target = [Inner]>,
@@ -53,10 +57,12 @@ where
5357
}
5458
}
5559

60+
#[cfg(any(test, feature = "conv"))]
5661
pub trait GifFile {
5762
fn to_gif(&self) -> Vec<u8>;
5863
}
5964

65+
#[cfg(any(test, feature = "conv"))]
6066
impl<Outer: ?Sized, Inner1, Inner2> GifFile for Outer
6167
where
6268
Outer: Deref<Target = [Inner1]>,

ashen/src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pub mod compression;
2-
#[cfg(any(test, feature = "conv"))]
2+
// TODO(Unavailable): Rename to "conv"
33
pub mod format;
44
pub mod iterator;
55
pub mod nom;

0 commit comments

Comments
 (0)